我要問我們如何才能增加在.htaccess文件包括笨在index.php去除規則額外的重寫規則(一個或多個)。的.htaccess多個重寫規則笨
這裏是我的.htaccess文件
RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^profile/([0-9]+)$ /index.php/front/profileDetail/$1
RewriteRule ^(.*)$ /index.php/$1
的問題是,只有規則的一個工作在同一時間。如果我保存上面顯示的文件,它將返回內部服務器錯誤!
我想完全是刪除index.php文件加上改寫從xyz.com/front/profileDetail/50鏈接到xyz.com/profile/50
請大家幫忙出了什麼問題,我在完全新手對此。
謝謝!提前。
我會用改寫路由(配置/ routes.php文件)'xyz.com /正面/ profileDetail/50'到'xyz.com/profile/50',而不是.htaccess。 – Mudshark