2011-02-09 40 views
0

如何用htaccess刪除追蹤期(點)?htaccess - 刪除追蹤期

如果訪問者去http://example.com/mypage。它會給404錯誤。我已經在我的htaccess文件如下:

RewriteRule ^(.*)\.html$ http://example/$1 [R,L] 
RewriteRule ^(.*)\.htm$ http://example.com/$1 [R,L] 

我認爲增加這會工作,但不會:提前

RewriteRule ^(.*)\.$ http://example.com/$1 [R,L] 

感謝。

+0

我想你需要使用[mod_rewrite的的日誌記錄功能]做一些調試(http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html #rewriteloglevel)。 – Gumbo 2011-02-10 15:31:18

+0

我有同樣的問題。 rewriteerule:[pre] RewriteRule^author /([Az。] +)/([Az] +)$ get_author_articles.php?first_name = $ 1&last_name = $ 2應用於http:// localhost:8080/API/author/J./Doe – 2016-05-31 16:07:14

回答

0
RewriteRule ^(.+)\.$ http://www.example.com/$1 [R=301,L] 

將刪除尾隨點