我想作以下改寫:的.htaccess - 內部服務器錯誤
http://example.com/folder1/folder3/index.html
到:
http://example.com/folder1/folder2/folder3/index.html
的,我試過以下的.htaccess:
RewriteEngine On
RewriteBase/
RewriteCond %{REQUEST_URI} !^folder1/folder2/.*$
RewriteRule ^folder1/(.*)$ /folder1/folder2/$1 [L]
但我得到:Internal Server Error
在另一方面,如果我做了一個實驗(只是用於測試),如:
RewriteEngine On
RewriteBase/
RewriteCond %{REQUEST_URI} !^folder1/folder2/.*$
RewriteRule ^folder1/(.*)$ /kkk/folder2/$1 [L]
然後重寫:
http://example.com/folder1/folder3/index.html
到:
http://example.com/kkk/folder2/folder3/index.html
作品。但我需要第一次重寫。
關於如何解決這個問題的任何想法?
[編輯字 「重定向」 - >詞 「改寫」]
[編輯在error.log添加內容]
在以下jsbin你有error.log中的內容:
http://jsbin.com/fajohugase/1/edit?output
'/ folder1 /'中是否還有.htaccess? – anubhava