Forum Moderators: phranque
[yoursite.com...]
to the root:
[yoursite.com...]
We are talking like 500,000 folders in the directory folder all moved to the root.
I can't find the mod_rewrite example for this directive but I really need to so the search engines just seamlessly go to the directory in the new location which is the root. I take it the code goes in .htaccess?
Looking forward to your answers.
Welcome to WebmasterWorld [webmasterworld.com]!
Here's a good place to start: Introduction to mod_rewrite [webmasterworld.com]
Also, please read our Apache Forum Charter [webmasterworld.com] to help you get oriented here.
Thanks!
Jim
RewriteEngine on
RewriteRule ^page1\.shtml$ page2.shtml [R=301,L]
So I load page 1
[mysite.com...]
...and get
[mysite.com...]
...so as you can see there is a redirect of sorts but it is tacking on the full path to the root URL?
RewriteEngine on RewriteBase /
RewriteRule ^page1\.shtml$ /page2.shtml [R=301,L]
My other question which I have been searching for to no avail yet is I need to redirect everything in a particular directory up into the root. So for example:
[mysite.com...]
gets redirected to...
[mysite.com...]
and this...
[mysite.com...]
gets redirected to...
[mysite.com...]