2
我试图创建.htaccess重定向,以便文件夹将重定向到其正确的页面。动态.htaccess重定向
例如... http://example.com/contactus/help.html会重定向到http://example.com/contact-us/help.html或http://example.com/contactus到http://example.com/contact-us
我试图创建.htaccess重定向,以便文件夹将重定向到其正确的页面。动态.htaccess重定向
例如... http://example.com/contactus/help.html会重定向到http://example.com/contact-us/help.html或http://example.com/contactus到http://example.com/contact-us
<IfModule mod_rewrite.c>
RewriteCond %{HTTP_HOST} ^example\.com/contactus/(.+)$ [NC]
RewriteRule^http://example\.com/contact-us/%1 [R=301,L]
</IfModule>