2012-05-07 71 views
0

我正在制作一个网站,我不明白为什么mod_rewrite不起作用。URL重写不能正常工作

下面是本网址:http://www.treetle.com/profile/index/show/rameshmantha
,并希望它改写为http://www.treetle.com/profile/rameshmantha

rameshmantha是一个文件名(其中动态来) ,这里是我的.htaccess文件。

RewriteEngine on 

Options +FollowSymLinks 

RewriteCond $1 !^(index\.php|resources|robots\.txt) 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 

RewriteRule ^(.*)$ index.php/$1 

RewriteRule ^/profile/([a-z]+)?$ /profile/index/show/$1[L,QSA] 

回答

1

RewriteRule ^(.*)$ index.php/$1符合一切。您是否尝试将订单交换到:

RewriteRule ^/profile/([a-z]+)?$ /profile/index/show/$1[L,QSA] 
RewriteRule ^(.*)$ index.php/$1