【发布时间】:2016-09-22 08:30:15
【问题描述】:
我已经更改了我的 .htaccess 以制作漂亮的 url。 这有什么问题?
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([a-zA-Z0-9-/]+).html$ article.php?url=$1 [NC,L]
RewriteRule ^([a-zA-Z0-9-/]+).html/$ article.php?url=$1 [NC,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^category/([a-zA-Z0-9-/]+).html$ category.php?cat=$1 [NC,L]
RewriteRule ^category/([a-zA-Z0-9-/]+).html/$ category.php?cat=$1 [NC,L]
我从中得到了 .htaccess rewriteRule conflict
我想做这样的
localhost/category/bla.html
localhost/seo/bla.html
这是数据库中的网址
bla.html
seo/bla-bla.html
【问题讨论】:
-
您要达到的网址是什么,原始网址是什么,请单独提及。
-
谢谢,我搞定了。
标签: html apache .htaccess mod-rewrite