【发布时间】:2024-05-17 03:10:01
【问题描述】:
我是第一次尝试重写 URL,我有以下 URL 需要重写:
http://domain.com/resorts.php?countryname=Portugal
http://domain.com/rss.php?destination=Torremolinos&itemtype=rfamily
我在 .htaccess 文件中写了以下内容:
Options +FollowSymLinks
RewriteEngine on
RewriteRule /countryname/(.*)/ resorts.php?countryname=$1
RewriteRule /destination/(.*)/itemtype/(.*)/ rss.php?destination=$1&itemtype=$2
但是当我尝试以下操作时,我一直找不到 URL。请有人指出我可能做错了什么?非常感谢。
http://domain.com/countryname/Portugal
http://domain.com/destination/Torremolinos/itemtype/rfamily
【问题讨论】:
标签: php apache .htaccess url-rewriting