1
我想要所有帶有.html擴展名的網址。如何在htaccess中使用.html擴展名的410個所有網址
說xx.html,yy.html(所有與.html)。
我如何使用htacess獲得重寫或重定向410規則?
我想要所有帶有.html擴展名的網址。如何在htaccess中使用.html擴展名的410個所有網址
說xx.html,yy.html(所有與.html)。
我如何使用htacess獲得重寫或重定向410規則?
HTTP狀態410
表示「Gone」,可以通過mod_rewrite中的[G]
標誌完成。
RewriteRule \.html$ - [G]
見documentation for the G flag和documentation for mod_rewrite。
在.htaccess文件中使用它。
RewriteEngine On
RewriteRule \.html$ - [G]
不確定。獲得500錯誤。我正在使用 你能給我完整的代碼嗎? –
@HelenM自從你提到.htaccess我假設某種Apache服務器。在這種情況下,您應該在嘗試解決此問題時檢查_error_日誌。 – jdv