views:

27

answers:

1

hi, i need to redirect temporally a domain to a subdomain, this is my code for .htaccess:

Redirect 302 / http://m.domain.com/

this works great, but i have some subdirectories like: http://domain.com/photos, the code above redirects this way: http://m.domain.com/photos i have a lot of subdirs and sub-subdirs, how i can redirect successfully all the subdirs to the same subdomain? (http://m.domain.com/)

A: 

Check out this post, I think it might help you. It looks like all you'd need to do is change your redirect to look something like:

Redirect 302 ^/.+/.*$ http://m.domain.com/

http://stackoverflow.com/questions/1612729/htaccess-redirect-problem-all-subdirectories-to-root-solved

Andrew Church