views:

17

answers:

1

Redirection using HTACCESS is working fine on the server but not on the Sub Domain. I used the following HTACCESS code for the redirection task:

Options +FollowSymlinks
RewriteEngine On 
RewriteRule ^user/(.+)$ done.php?info=$1

http://site.com/user/123/USA to http://site.com/done.php?info=123/USA

Does any changes needed on the Sub Domains to work this HTACCESS code?

http://test.site.com/user/123/USA to http://test.site.com/done.php?info=123/USA

A: 

It wholly depends on the exact configuration of the subdomain. It might be as easy as changing this:

RewriteRule ^user/(.+)$ done.php?info=$1

into this:

RewriteRule ^/?user/(.+)$ done.php?info=$1

But without the server configuration it's hard to tell. I'd say enable RewriteLog (cannot be done in .htaccess), check it's output, and if still unclear report back with the differences in configuration between domain & subdomain.

Wrikken