2012-05-07 113 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