0
我不知道爲什麼它看起來比我的htaccess重寫url在123reg上完全不起作用。 上OVH(我的測試環境在):HTTP:www.luckyunlucky.co.uk/mvc它123reg正常工作 :http://www.petitmondelondon.co.uk只索引訪問之後,我有一個錯誤404url rewriting htaccess 123reg
我的htaccess: 根:
SetEnv PHP_VER 5
SetEnv REGISTER_GLOBALS 0
RewriteBase/
<IfModule mod_rewrite.c>
Options +FollowSymlinks
RewriteEngine on
RewriteRule ^$ public/ [L]
RewriteRule (.*) public/$1 [L]
</IfModule>
,並在公共
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# Rewrite all other URLs to index.php/URL
RewriteRule ^(.*)$ index.php?url=$1 [PT,L]
</IfModule>
<IfModule !mod_rewrite.c>
ErrorDocument 404 index.php
</IfModule>
這只是一個噩夢,請幫助我!?
我需要更多的細節。問題發生在一臺服務器上,而不是另一臺服務器上?兩者有什麼區別? index.php如何處理URL? – nkorth 2013-03-25 16:24:19
「mod_rewrite.c」是否啓用/加載,您可以通過服務器配置使用它嗎? – CBroe 2013-03-25 16:27:31
好的,一些谷歌搜索告訴我,123reg是一個虛擬主機。 (將來,你應該澄清這樣的事情。)你應該嘗試的第一件事是將'RewriteBase /'放在這兩個規則集中。這只是第一個。 – nkorth 2013-03-25 16:27:59