我在制作友好的网址时遇到问题。我需要将网址从http://blabla.eu/stats_details?date=01-2012
转换为http://blabla.eu/stats_details/01-2012
。其他重写规则在最后一个规则旁边正常工作。有什么问题?
以下是.htaccess
的代码:
AddDefaultCharset utf-8
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^admin/users/$ /admin/users/view.php [L]
RewriteRule ^admin/loans/$ /admin/loans/view.php [L]
RewriteRule ^stats_details/(.*)$ stats_details.php?date=$1 [L,QSA]
</IfModule>
答案 0 :(得分:0)
我认为这必须可行,尝试粘贴
RewriteEngine开 RewriteBase /
# Removes index.php from ExpressionEngine URLs
RewriteCond %{THE_REQUEST} ^GET.*index\.php [NC]
RewriteCond %{REQUEST_URI} !/system/.* [NC]
RewriteRule (.*?)index\.php/*(.*) /$1$2 [R=301,NE,L]
# Directs all EE web requests through the site index file
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php/$1 [L]