我使用CI並得到了這樣的URL:使用此.htaccess文件刪除的index.php www.example.com/product/id/5笨的mod_rewrite:刪除子文件夾中的網址
:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !^(index\.php|favicon\.ico|img|js|robots\.txt|css)
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>
我該如何擴展.htaccess文件以擺脫URL中的'/ id /'?
提前THX
也許是更容易只是調整你的路線? – sbeliv01