2011-02-09 39 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] 

将删除尾随点