【发布时间】:2013-04-05 04:48:32
【问题描述】:
这是我们网站的实际网址
http://www.globalmedicalaware.com/gma-new/home.php?city=Chennai
我使用 .htaccess 以下代码重写了 url
Options +FollowSymLinks
RewriteEngine on
RewriteRule /city/(.*) home.php?city=$1
现在 url 重写为
http://www.globalmedicalaware.com/gma-new/home/city/Chennai
我在 column-right.php 和其他一些区域(如页脚、..etc、..this)中编写了代码
if($_SERVER['PHP_SELF']=='/gma-new/home.php') {
------------ some designs and action to display the column right for home.php only -----------
}
在$_SERVER['PHP_SELF'] 的本地主机中正确显示/gma-new/home.php..
但在$_SERVER['PHP_SELF'] 的实时站点中显示city/Chennai..so 列正确的home.php 编码不起作用..
请帮帮我..
【问题讨论】:
标签: php .htaccess mod-rewrite url-rewriting url-redirection