开发者

.htaccess rewrite rule not behaving as expected

开发者 https://www.devze.com 2022-12-12 06:37 出处:网络
I am attempting to have http://mysite.com/orders/10000111 rewritten to http://mysite.com/orders/details.pl/10000111

I am attempting to have http://mysite.com/orders/10000111 rewritten to http://mysite.com/orders/details.pl/10000111

Here is what I have in my .htaccess

RewriteEngine On
RewriteBase /
RewriteCond %{SCRIPT_FILENAME} ^orders\/([0-9]+)
RewriteRule ^orders\/([0-9]+)$ orders/details.pl/$1 [NS,NC,QSA]

Can someone help out and tell me how I am 开发者_运维问答being an idiot?


no need to escape / as in \/

Options +FollowSymlinks
RewriteEngine on
RewriteRule ^orders/([0-9]+)$ /orders/details.pl/$1 [NC]

should do the job

0

精彩评论

暂无评论...
验证码 换一张
取 消