我正在尝试将地址 www.example.com/tops/articles/first_article 重定向
到
地址
www.example.com/tops/test1.php?name=first_article
还将地址 www.example.com/tops/galleries/first_gallery 重定向
到
地址
www.example.com/tops/test2.php?name=first_gallery
以及所有其他地址,例如
www.example.com/tops/first_page
到
www.example.com/tops/page.php?name=first_page
以下 htaccess 文件给了我一个重定向循环。
RewriteEngine on
Options +FollowSymLinks
RewriteRule ^/tops/articles/(.+)$ /tops/test1.php?name=$1 [L]
RewriteRule ^/tops/galleries/(.+)$ /tops/test2.php?name=$1 [L]
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteRule (.*)$ ./page.php?name=$1
有人知道这是为什么吗?我究竟做错了什么?
提前致谢。