1
寻找htaccess的高效重定向代码。 大约有200个链接(几乎所有的请求都将通过重定向)htaccess的高效重定向代码
目标:
http://example.com/pages.shtml
被重定向到http://example.com/pages
应该是301重定向记住网页排名保鲜保持
寻找htaccess的高效重定向代码。 大约有200个链接(几乎所有的请求都将通过重定向)htaccess的高效重定向代码
目标:
http://example.com/pages.shtml
被重定向到http://example.com/pages
应该是301重定向记住网页排名保鲜保持
RewriteRule ^([^/]+)\.shtml http://example.com/$1 [L,R=301]
谢谢你Timofey Stolbov! 一个小问题......在这种情况下什么更有效率/更有效。 重写规则^([^ /] +)\。SHTML http://example.com/$1 [L,R = 301] OR 重写规则(([^ /] + /)* [^ /]+)\.(s?html?)$ http://www.example.com/$1 [R = 301,L] – 2011-05-20 12:45:48