I have decided to introduce folders into my URLs for SEO reasons. Now im trying to 301 all the old URLs.
The physical location of these 100+ pages is in the root:
www.mydomain.com/pageA1.php
www.mydomain.com/pageA2.php
www.mydomain.com/pageB1.php
www.mydomain.com/pageB2.php
I now want the URLs to include a folder name - but the physical location to stay the same:
www.mydomain.com/a-waste/pageA1.php
www.mydomain.com/a-waste/pageA2.php
www.mydomain.com/b-waste/pageB1.php
www.mydomain.com/b-waste/pageB2.php
My current rules are:
RewriteRule a-waste/pageA1.php /pageA1.php
RewriteRule a-waste/pageA2.php /pageA2.php
RewriteRule b-waste/pageB1.php /pageB1.php
RewriteRule b-waste/pageB2.php /pageB2.php
This works fine in the sense that if I browse www.mydomain.com/a-waste/pageA1.php - this URL stays in my address bar and it shows the page physically located www.mydomain.com/pageA1.php.
Now if I add [R=301,L] to this rule to tell google its permanent, it no longer rewrites the URL, it just redirects it instead? What am i missing?
thanks. Alex.