2016-11-21 70 views
0

我正在嘗試使用htacces將www.mywebsite.com/about.html網址欄中顯示的html擴展名重寫爲www.mywebsite.com/about。htacces 500內部服務器錯誤

這是我使用的代碼,但它似乎並沒有工作。誰能告訴我爲什麼這不起作用?任何答案和/或解釋非常感謝!

ErrorDocument 404 /404.html 

Options +FollowSymLinks 

RewriteEngine On 
RewriteRule ^home index.html 
RewriteRule ^about about.html 
RewriteRule ^services services.html 
+0

您將不得不查看Apache錯誤日誌(請諮詢您的主機以瞭解這些日誌的位置)以獲取有關錯誤的詳細信息。我的猜測是你有重寫循環,因爲'^ services'這樣的模式會匹配'/ services'和'/ services.html',然後無限地重寫爲'services.html'。你可能只需要添加'[L]'標誌並像'^ services $'' –

+0

那樣終止它們。錯誤日誌說了什麼? –

+0

也許相關:http://stackoverflow.com/q/7097004/1992669 –

回答

0

好吧,看來我的託管服務提供商不提供.htacces文件。 (像什麼F ...)。謝謝你們一起思考。乾杯