Hello,
I’m struggling with setting up a simple redirect with mod_rewrite for static pages…
I want to redirect a few static subpages to domain index.
Heres what I have now:
RewriteEngine On
# / for index wont work
Redirect 301 /subpage/foo /
Redirect 301 /subpage/foo2 /
# wont work as well
RewriteRule ^subpage/guidelines$ / [L,R=301]
RewriteCond %{HTTP_HOST} ^domain.org
RewriteRule (.*) http://www.domain.org/$1 [R=301,L]
How to set it to redirect to / (index) without entering domain name manually?
Which way is better - with redirect or rewriterule command?
Thanks for help