java重写onclick事件,Onclick url重写

我有一个我想重写的网址,因为来自noob develper的编程错误 .

php

$branch = "lwh/main/"; // Dirs in URL from host to main folder

$pagebranch = "lwh/"; // URL branch for hyperlinks

$apages = "account/";

$bpages = "booking/";

$gpages = "general/";

$ppages = "product/";

function //全球职能

function fetchdir($dir)

{

$protocol = $GLOBALS['protocol'];

$host = $GLOBALS['host'];

($dir == $GLOBALS['apages'] || $dir == $GLOBALS['bpages'] || $dir == $GLOBALS['ppages'] || $dir == $GLOBALS['gpages'] ? $branch = $GLOBALS['pagebranch'] : $branch = $GLOBALS['branch']);

echo $protocol.$host.$branch.$dir;

}

function fetchinline($dir)

{

$protocol = $GLOBALS['protocol'];

$host = $GLOBALS['host'];

($dir == $GLOBALS['apages'] || $dir == $GLOBALS['bpages'] || $dir == $GLOBALS['ppages'] || $dir == $GLOBALS['gpages'] ? $branch = $GLOBALS['pagebranch'] : $branch = $GLOBALS['branch']);

return $protocol.$host.$branch.$dir;

}

所以我说我在 general folder 有index.php,about.php

Home

Home

但问题在于它将成为网址

http://www.urltest.x10.mx/lwh/general/index.php

http://www.urltest.x10.mx/lwh/booking/car.php

MY question 如何重写网址,以便当您点击 general folder 中的任何链接时,它将像http://www.urltest.x10.mx/index.php

我想在你点击任何链接时重写网址 .

I have tried 在我的根目录

Options +FollowSymlinks

RewriteEngine on

RewriteCond $1 !^lwh/

RewriteRule (.*) /lwh/main/pages/general/$1 [L]

RewriteCond %{REQUEST_URI} !^lwh/

RewriteRule ^(.*)$ lwh/$1 [L]

RewriteCond %{HTTP_HOST} ^urltest.x10.mx [NC]

RewriteRule ^(.*)$ http://www.urltest.x10.mx/$1 [R=301,L]

AuthName "root"

AuthType Basic

require valid-user

Options -Indexes

在 lwh 文件夹中我有

RewriteEngine on

RewriteBase /

RewriteRule ^general/(.*)$ lwh/main/pages/general/$1 [L]

RewriteRule ^account/(.*)$ lwh/main/pages/account/$1 [L]

RewriteRule ^booking/(.*)$ lwh/main/pages/booking/$1 [L]

RewriteRule ^product/(.*)$ lwh/main/pages/product/$1 [L]

RewriteRule ^$ lwh/main/pages/account/ [L]

RewriteRule ^$ lwh/main/pages/general/ [L]

RewriteRule ^$ lwh/main/pages/booking/ [L]

RewriteRule ^$ lwh/main/pages/product/ [L]

ErrorDocument 404 /lwh/main/pages/general/index.php

Options -Indexes

AuthName "main"

隐藏 lwh 文件夹,但当我点击一个链接时,我仍然得到填充网址...

请有人帮忙

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值