PHP友好URL的问题

时间:2015-12-13 12:46:56

标签: php html

我可以在localhost上获取友好的URL,但不能在我的Web服务器上工作。任何想法。

$countryfriendly = GenerateUrl ($country_name_bread);

$regionfriendly = GenerateUrl ($region_name_bread);

$townfriendly = GenerateUrl ($town_name_bread);

$titlefriendly = GenerateUrl ($fetch_property["property_name"]);

以上内容取自breadcrumb并放入下面的按钮(URL友好按钮)

<!--<a href="/' .$countryfriendly .'/' .$regionfriendly. '/' .$townfriendly. '/' . $titlefriendly . '/' .md5($id).'" button type="submit" class="btn btn-  primary">MORE DETAILS</button></a>-->

原始按钮

<a href="'.$WS_PATH.'/members/property_details.php?q='.md5($id).'&he=act"    button type="submit" class="btn btn-primary">MORE DETAILS</button></a>

网页源代码显示

<!--<a href="/portugal/algarve/lagos/name/819f46e52c25763a55cc642422644317" button type="submit" class="btn btn-primary">MORE DETAILS</button></a>-->

它是正确的,但点击它,它无处可去?它可以看到你的注释。

原作正常

<a href="http://www.domain.com/members/details.php?q=819f46e52c25763a55cc642422644317&he=act" button type="submit" class="btn btn-primary">MORE DETAILS</button></a>

友好的URL按钮链接仅适用于localhost?它在我的网络服务器上不起作用......它显示正确但点击时无处可去?错误是“找不到404页面”.....

选项+ FollowSymLinks All -Indexes

上的RewriteEngine

for town

RewriteRule ^continent/(.*)/(.*)/(.*)/(.*).php/(.*)  /maps.php?contifolder=$1&countryfolder=$2&statefolder=$3&gettown=$4&pg=$5 [L]

for town

RewriteRule ^continent/(.*)/(.*)/(.*)/(.*).php  /maps.php?contifolder=$1&countryfolder=$2&statefolder=$3&gettown=$4 [L]

for states / region

RewriteRule ^continent/(.*)/(.*)/(.*).php  /maps.php?contifolder=$1&countryfolder=$2&getstate=$3 [L]

对于国家/地区

RewriteRule ^continent/(.*)/(.*).php  /maps.php?contifolder=$1&getcountry=$2 [L]

对于各大洲

RewriteRule ^continent/(.*).php  /maps.php?getconti=$1 [L]

任何?

0 个答案:

没有答案