【发布时间】:2014-07-30 09:27:30
【问题描述】:
我目前在我的 .htaccess 文件中遇到重定向问题,该问题与用于在我们的 CMS 中提供页面的重写规则冲突。
这是我的 .htaccess:
RewriteEngine On
Options +FollowSymlinks
Options -Indexes
Redirect 301 /test-page http://www.example.com/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/\.]+)/?$ index.php?slug=$1
问题是当我转到http://www.example.com/test-page 时,我被重定向到http://www.example.com/?slug=test-page 而不是http://www.example.com。
非常感谢任何帮助。
谢谢。
【问题讨论】:
标签: apache .htaccess mod-rewrite redirect