为什么模式RewriteRule不能正常工作?

时间:2017-06-21 05:46:42

标签: .htaccess mod-rewrite url-rewriting

我在htaccess中进行重写模式,但它不起作用,为什么?我想从丑陋的www.domain.com/contact

中制作精美的网址www.domain.com/index.php?route=information/contact
RewriteRule ^contact$ index.php?route=information/contact[L]

这是我目前的.htaccess

RewriteBase /
RewriteRule ^sitemap.xml$ sitemap/sitemap-index.xml [L]
RewriteRule ^googlebase.xml$ index.php?route=feed/google_base [L]
RewriteRule ^system/download/(.*) /index.php?route=error/not_found [L]
RewriteCond %{REQUEST_FILENAME} !-f                                                   
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css)
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]

0 个答案:

没有答案