[英]How to .htaccess RewriteRule?
i'm trying to make this address: 我正在尝试填写此地址:
http://www.mysite.co.uk/Listing/London/34 http://www.mysite.co.uk/Listing/伦敦/ 34
really look for: http://www.mysite.co.uk/Listing/listed.php?area=London&list=34 behind the scenes. 真正寻找: http : //www.mysite.co.uk/Listing/listed.php? area = London&list = 34在幕后。
I tried this ReWrite in the htacess file in "Listing" folder but it dosen't work: 我在“ Listing”文件夹中的htacess文件中尝试了此ReWrite,但是它不起作用:
RewriteRule ^([a-z0-9]+)/([a-z0-9]+)$ /listed.php?area=$1&list=$2 [NC,L]
Try a relative substitution path instead: 尝试使用相对替换路径:
RewriteRule ^([a-z0-9]+)/([a-z0-9]+)$ listed.php?area=$1&list=$2 [NC,L]
It can also be possible that you're not allowed to use .htaccess files besides in the document root directory. 也有可能除了文档根目录之外,也不允许您使用.htaccess文件。
我认为您只需要从一开始就删除^
并将目的地从/listed.php
更改为/Listing/listed.php
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.