Go Back   HostGator Peer Support Forums > Public Forums > Suggestions

Notices

Reply
 
Thread Tools
  #26  
Old 07-27-2008, 03:29 PM
slapshotw's Avatar
slapshotw slapshotw is offline
Veteran Croc
 
Join Date: Jun 2006
Posts: 5,164
Default Re: .htaccess addon domains

It's getting a little hard for me to follow this thread. Have you already tried clearing out your .htaccess, and just setting up redirects in cPanel X3 using the "wildcard" option (which should redirect everything including the slash and anything after it)?
__________________
Follow me on Twitter! http://twitter.com/mrw
Reply With Quote
  #27  
Old 07-30-2008, 09:12 AM
visitor visitor is offline
Hatchling Croc
 
Join Date: Apr 2008
Posts: 28
Default Re: .htaccess addon domains

Quote:
Have you already tried clearing out your .htaccess, and just setting up redirects in cPanel X3 using the "wildcard" option
Your the man !

Yes, I did start from fresh, but not with cPanel X3 !

So, I just deleted .htaccess in the root AND inside that folder, and used cPanel to set up the re-direct

YIPPY !

This is what it made this time;
Code:
RewriteCond %{HTTP_HOST} ^maindomain.co.uk$ [OR]
RewriteCond %{HTTP_HOST} ^www.maindomain.co.uk$
RewriteRule ^addondomainfolder/?(.*)$ "http\:\/\/www\.addondomain\.us\/$1" [R=301,L]
Just one problem, while there is a .htaccess file inside the "addondomainfolder" it stops it working. So I started removing things, but it still didnt work until I deleted it.

So have added the "addondomain" hotlink protect code to the main site. But then what about my custom error pages which ones will load?.

Answer = the right ones For some reason I dont need the "ErrorDocument 400 /400.shtml" added to the addondomain for them to work, I guess when there is an error (Page not found), because its inside a folder it loads the right .shtml inside the folder.

So far have tried everything I can think of, and its all redirecting perfect !

Well that is all except "https" for some reason that brings up a hostgator error page. No I havent set up SSL (Shared) so perhaps thats why.

but whos going to type https anyway (Me)

Thank for your help !

Last edited by visitor; 07-30-2008 at 09:14 AM.
Reply With Quote
  #28  
Old 07-30-2008, 09:31 AM
visitor visitor is offline
Hatchling Croc
 
Join Date: Apr 2008
Posts: 28
Default Re: .htaccess addon domains

Oh well found a slight problem

Code:
http://www.addondomain.us/nopage.html
Redirects ok to the error page with the right path.

but
Code:
http://addondomain.us/nopage.html
redirects to the right error page, but wrong path

Code:
http://www.addondomain.us/addondomainfolder/nopage.html
in the main site .htaccess I had this

Code:
rewritecond %{http_host} ^maindomain.co.uk [nc]
rewriterule ^(.*)$ http://www.maindomain.co.uk/$1 [r=301,nc]
That still works fine, tried adding the same for the addondomain and the results are on another planet.

At this time, I decided its good enough

Watch this space
Reply With Quote
  #29  
Old 07-30-2008, 07:10 PM
slapshotw's Avatar
slapshotw slapshotw is offline
Veteran Croc
 
Join Date: Jun 2006
Posts: 5,164
Default Re: .htaccess addon domains

You're welcome and glad you got it working!
__________________
Follow me on Twitter! http://twitter.com/mrw
Reply With Quote
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Fascinating problem with .htaccess and addon domain paradigm Shared Hosting Support 14 04-08-2010 10:02 AM
redirecting .htaccess addon domain problem PhxStorks Shared Hosting Support 5 06-25-2008 03:01 PM
htaccess ...... multi domains ???? leftie Shared Hosting Support 7 06-05-2008 03:09 PM

All times are GMT -6. The time now is 04:28 AM.