我有一个重写规则。
RewriteRule ^pages/(.+)$ info_pages.php?page_url=$1 [L]
这之前运作良好。
我的网址是这样的,但在本地主机上
http://dressgirls.com/demo2/pages/contact-us.html
这指向
http://dressgirls.com/demo2/info_pages.php
当我使用这个
echo $_GET['page_url'];
它给了我。contact-us.html/contact-us.html/contact-us.html
它应该contact-us.html
只给一次。
你知道这里有什么问题吗?
这是完整的代码
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^pages/(.+)$ info_pages.php?page_url=$1 [L]
RewriteRule ^reviews/(.+)$ edit_review.php?review_id=$1 [L]
RewriteRule ^deals/(.+)$ category.php [L]
RewriteRule ^city/(.+)$ location_deals.php [L]
#RewriteCond %{REQUEST_FILENAME} =-f
#RewriteRule ^(.*)\.php$ $1.html [NC,L]
#RewriteRule ^(.*)\.html$ $1.php [NC,L]
RewriteCond %{REQUEST_FILENAME} ^(.*)\.html$
RewriteCond %1.php -f
RewriteRule ^(.*)\.html$ $1.php [L,QSA]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^(.*)$ deal-detail-page.php [QSA,L]
</IfModule>
谢谢。