.htaccess 在单个页面上未屏蔽


.htaccess unmasked on single page

我一直在研究各种.htaccess教程和指南,将我的动态URL转换为平面SEO友好的URL。

一切都运行正常,除了一个链接,它似乎恢复为动态 URL。我尝试禁用一些规则,但似乎无法解决问题。

重定向示例

http://iforwms.com/page/home => http://iforwms.com/index.php?page=home(没问题)

http://iforwms.com/page/blog => http://iforwms.com/index.php/blog?page=blog (??

这是我的整个.htaccess文件。希望有人能对此有所了解...

# Set Timezone
SetEnv TZ Asia/Shanghai
Options +FollowSymLinks 
# Enable Rewriting
RewriteEngine on 
# Redirect non-www urls to www
RewriteCond %{HTTP_HOST} ^www'.iforwms'.com$ [NC]
RewriteRule ^(.*)$ http://iforwms.com/$1 [R=301,NC,L]
# Rewrite user URLs
RewriteRule ^page/('w+)$ index.php?page=$1 [L]
# Retrieve tagged blog posts
RewriteRule ^page/blog/('w+)$ index.php?page=blog&tag=$1 [L]
# Retrieve single blog post
RewriteRule ^page/article/(.*)/(.*)$ index.php?page=blog&article=$2 [L]

提前感谢,

-ifor

我删除了重写链接的"页面",它以某种方式解决了这个问题。这是我为碰巧遇到相同问题的任何其他人更新的 .htaccess。

# Set Timezone
SetEnv TZ Asia/Shanghai
Options +FollowSymLinks 
# Enable Rewriting
RewriteEngine on 
# Redirect non-www urls to www
RewriteCond %{HTTP_HOST} ^www'.iforwms'.com$ [NC]
RewriteRule ^(.*)$ http://iforwms.com/$1 [R=301,NC,L]
# Rewrite user URLs
RewriteRule ^('w+)$ index.php?page=$1 [L]
# Retrieve tagged blog posts
RewriteRule ^blog/('w+)$ index.php?page=blog&tag=$1 [L]
# Retrieve single blog post
RewriteRule ^article/(.*)/(.*)$ index.php?page=blog&article=$2 [L]