[英].htaccess not fallowing the requested url | codeigniter url routing
原始網址:
https://www.doctor24.ro/i/index.php/en/property/54a402a9d4f13/Sapientek-Ecografie
.htaccess之后的請求網址:
https://www.doctor24.ro/i/cabinet/Sapientek-Ecografie
.htaccess
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteRule ^cabinet/(.*)$ ./index.php/en/property/([a-zA-Z0-9-=_?]+)*$
問題是什么 ?
更新:
我正在使用的腳本使用codeigniter url路由 。
已更新立即嘗試以下操作:
RewriteRule ^i/cabinet/(.*)$ i/index.php/en/property/$1
您不能在右側使用正則表達式,而只能使用反向引用變量。 看起來您也將這個.htaccess放在/i/
文件夾中。 您還需要使用適當的RewriteBase
:
Options +FollowSymLinks
RewriteEngine On
RewriteBase /i/
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteRule ^cabinet/(.*)$ index.php/en/property/$1 [L,NC]
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.