Where do I put .htaccess ??

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

I have a main domain who files are in the root of my hosted space:

I have a subdomain who files are located off the root:

I currently have an 'addon domain' who shares the same files as the

I now want to redirect the addon domain to another domain.

So do I place the .htaccess in the root or the sub domain directory ?

I have tried the root and it didn't seem to work !!


Re: Where do I put .htaccess ??

Quoted text here. Click to load it

I think it goes in the folder you want to protect but make sure it has the
right permissions so it can be read.


Re: Where do I put .htaccess ??

Quoted text here. Click to load it

I believe all subfolder of an htaccess file are goverened by the
htaccess rules.  Therefore placing it at:
username\public_html\    will also apply to

I do not understand what you mean by 'addon domain'.  Post what you have
in your htaccess file.  

Re: Where do I put .htaccess ??

jerryyang_la1@yahoo.com wrote:
Quoted text here. Click to load it
I had the same problem/ stucture; a .htaccess goes in the subdomain to
redirect anything for that subdomain.

Re: Where do I put .htaccess ??

I'm using this:

RewriteEngine On
RewriteCond % ^(www\.)?test\.co.uk$ [NC]
RewriteRule ^(.*)$ http://www.newdomain.com /$1 [R=301,L]

test.co.uk being the old domain and newdomain.com being the new
domain :)

If I put this in the root, and then try to browse to test.co.uk I get
an error and this in the address bar:

If I put it in the subdomain folder, it works fine !!

Any advice ?

Site Timeline