重写url blog.php到博客的问题

时间:2017-05-14 12:49:49

标签: .htaccess mod-rewrite

到目前为止,我有这个,它可以工作,但当我用它作为

ISO/IEC-8859-1 (Latin1)

重定向到

http://www.example.com/blogs

RewriteEngine On
DirectoryIndex website-design-example.php
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
RewriteRule ^blogs$ blog.php      [NC,L]
RewriteRule ^blogs/$ blog.php     [NC,L]
RewriteRule ^blogs/page/([0-9]+)$ /blog.php?page=$1 [NC,L]
RewriteRule ^blogs/([0-9]+)$ /blogPost.php?post=$1 [NC,L]
RewriteRule ^blogs/([0-9]+)/([a-zA-Z0-9-=\/]+)$ /blogPost.php?post=$1 [NC,L]

有人可以指导我,我做错了什么!

由于

0 个答案:

没有答案