0
您好I的值有在iirf.iniURL重寫 - 請求URI被設定爲可變
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^/subdir/(.*)$ /subdir/index.php?p=$1 [NC,L]
預期輸出一個重寫配置應該是從URL www.domain.com/subdir/home
轉換應是www.domain.com/subdir/index.php?p=home
但是,輸出是www.domain.com/subdir/index.php?p=index.php?p=home
我們需要產生預期的輸出。
嗨,鏈接是這樣的''在我們的重寫文件中它應該被解釋爲'/subdir/index.php?p = home',而是它被解釋爲'/subdir/index.php?p = index.php?p = home' –
您是否嘗試過使用完整版本的鏈接?你可以像這樣做一個URL函數 'define('BASE','http:// localhost/my_project'); function base_URL($ slug =''){ return BASE。'/'。$ slug; }'並使用你的hrefs,如 '' –