我想reqrite我的網址。如何我可以重寫我的URL http://www.ritascantina.com/latestnews/index/18到http://www.ritascantina.com/latestnews/18
現有的網址是:http://www.ritascantina.com/latestnews/index/18
,我想是這樣的:http://www.ritascantina.com/latestnews/18
我的.htaccess文件是:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase/
RewriteRule ^(home(/index)?|index(\.php)?)/?$/[L,R=301]
RewriteRule ^(.*)/index/?$ $1 [L,R=301]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>
<IfModule !mod_rewrite.c>
ErrorDocument 404 /index.php
</IfModule>
有什麼建議?
當您嘗試訪問該頁面時,您會得到什麼? – Chausser