Well I thought this would be simple, but I guess I just can't figure it out.
I have a site at:
http://www.mydomain.com/my-store
It has categories in it like:
http://www.mydomain.com/my-store/my-category/
It also has products like:
http://www.mydomain.com/my-store/my-category/my-product.html
I just moved my store from the subfolder it was in to the root directory on my server. Now I need to redirect everything.
So from:
http://www.mydomain.com/my-store
To:
http://www.mydomain.com
And:
http://www.mydomain.com/my-store/my-category/
To:
http://www.mydomain.com/my-category/
And:
http://www.mydomain.com/my-store/my-category/my-product.html
To:
http://www.mydomain.com/my-category/my-product.html
Obviously I can just do a bunch of 301 redirects for each product and category, but that would take forever and I'd have a huge .htaccess file.
Does anyone know of a shorter/easier way to do this?
Thank you,
Brandon
I am by no means an Apache person… But can't you do something with RewriteCond/RewriteRule where it looks for mydomain.com/my-store and rewrites it as mydomain.com?
Tony,
Huh, that is weird. I tried that already, but it wasn't working. I just set up the redirect again and now it works perfectly.
Maybe I just had a typo or something?
Thank you for your help though, I'm glad I tried it again.
Brandon