2011-12-30 27 views
0

目前,我想要有我的1and1主機與mod_rewrite的.htaccess文件啓用,它適用於我的本地WAMP,但它不會在服務器上,的1and1 mod_rewrite的問題

任何幫助將不勝感激!

我試圖消除一切,但mod_rewrite的塊和問題仍然存在......

我問過1 & 1的支持,他們關閉了我的票沒有回答...... O_O,

請幫忙!

.htaccess文件:

# 
# Dream Forgery Settings: 
# 
AddType x-mapp-php5 .php 

RewriteEngine on 
RewriteBase/

# Rewrite current-style URLs of the form 'strap.php?q=x'. 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule ^(.*)$ /strap.php?q=$1 [L,QSA] 

編輯:

我沒有訪問Apache日誌,因爲這是一個共享的主機,但預期的功能是重定向的URL,例如:

http://example.com/arg1/arg2/arg3

http://example.com/strap.php?q=arg1/arg2/arg3

(目前給予404錯誤,只有404從1 & 1頁顯示出來)

+0

,什麼是問題?請解釋什麼在工作,什麼不是。 – Gerben 2011-12-30 17:44:28

+0

我沒有訪問Apache日誌,因爲這是一個共享的主機,但預期的功能是重定向的URL,例如: http://example.com/arg1/arg2/arg3 到 HTTP: //example.com/strap.php?q=arg1/arg2/arg3 (目前它給404錯誤,並且自定義404頁面不顯示,只有從1&1的404頁面出現) – 2011-12-30 17:52:14

+0

似乎喜歡主機不支持htaccess。 – Gerben 2011-12-30 18:11:03

回答

8

在這裏找到了答案:

添加以下固定國防部重寫:

Options -MultiViews 

http://www.techpopuli.net/news/04/002289.html

+0

謝謝!!!它在我的1and1服務器上也很有魅力,非常討厭......我越來越瘋狂了! – 2013-03-09 11:37:16

0

刪除一切,但重要的位......

AddType x-mapp-php5 .php 

RewriteEngine on 
RewriteBase/

# Rewrite current-style URLs of the form 'strap.php?q=x'. 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule ^(.*)$ /strap.php?q=$1 [L,QSA] 

...看看怎麼了。文件的其餘部分不是必需的 - 這將[希望]隔離問題。和1 & 1 supports .htaccess

+0

剛剛嘗試過這個練習,但是它沒有解決問題,我仍然看到1&1的404錯誤... :(,而strap.php位於文檔根目錄,.htaccess位於文檔根目錄...這太讓人討厭了...... – 2012-01-03 15:44:56