【发布时间】:2015-11-06 05:31:48
【问题描述】:
我尝试准备从目录/a/ 到子文件夹/a/b/ 的重写规则,但我收到我的重写规则是循环的信息,所以我收到output URL 作为localhost/a/b/a/b/a/a/b 以请求localhost/a/ .我想收到:
localhost/a and rewrite to localhost/a/b
我试试:
RewriteEngine On
RewriteCond %{REQUEST_URI} !=/a/b
RewriteRule ^/a(.*)$ /a/b/$1 [L]
【问题讨论】:
标签: php regex apache .htaccess mod-rewrite