|
#1
|
|||
|
|||
|
This is a big problem now, and I find it strange why customer services cant help with it.
http://www.domain.co.uk is the main domain http://www.domain.us is an addon domain Both are working cpanel makes a folder called "domainus" where all the files for http://www.domain.us are stored However, I want to stop access to that folder from the main domain http://www.domain.co.uk/domainus/ will show the pages, Ive tried the cpanel redirect and it dont do anything, no good to change the index.html as all other files would still be available Did a search for .htaccess to change this, and tried many combanations none work. Am I missing something here ? cpanel not working, and .htaccess tests none work, when perhaps they should ? http://www.domain.co.uk/domainus/*.* should all go to http://www.domain.us/*.* I need a .htaccess lines to fix this? |
|
#2
|
||||
|
||||
|
Quote:
Quote:
__________________
- David |
|
#3
|
||||
|
||||
|
I agree about the redirect tool in cPanel. It should be fine for this-- can you give us the settings you're using? Also are you using the cPanel 11 theme? Confirm with support that you are, because it has a better redirect tool.
__________________
Follow me on Twitter! http://twitter.com/mrw |
|
#4
|
|||
|
|||
|
Hi
Well I just got two emails from support, and for some reason they talking about someting else, on about one of the domains not registerd or something its driving me mad now.What started off as a google error has become a big problem OK here is my .htaccess RewriteEngine on Rewritecond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f RewriteRule .php$ /404.php SetEnv TZ Europe/London RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !^http://maindomain.co.uk/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://maindomain.co.uk$ [NC] RewriteCond %{HTTP_REFERER} !^http://www.maindomain.co.uk/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://www.maindomain.co.uk$ [NC] RewriteRule .*\.(jpg|jpeg|gif|png|bmp)$ - [F,NC] ErrorDocument 400 /400.shtml ErrorDocument 401 /401.shtml ErrorDocument 404 /404.php ErrorDocument 500 /500.shtml rewritecond %{http_host} ^maindomain.co.uk [nc] rewriterule ^(.*)$ http://www.maindomain.co.uk/$1 [r=301,nc] Now all that is working 100% no problems. So Im trying to add to that a way to redirect the addondomain folder, I cant give an example now has I have tried about 50+ and none workcPanel Build 11.23.4-STABLE 26138 cPanel Pro 1.0 (RC1) Theme cPanel X v2.6.0 There are people out there saying "this works >" but it dont ![]() I started with live chat here, they didnt help at all so made a new ticket, and the very first thing they said that domain1.co.uk isnt registerd or something like that.Dont know where cpanel makes its changes, but its not to the .htaccess file im reading, as there was no update, even when I made it blank? Last edited by visitor; 07-23-2008 at 09:27 AM. |
|
#5
|
|||
|
|||
|
Ah, just an update on this, I may have missed it. I deleted the .htaccess file then tried again with cpanel. It made a new .htaccess with this
RewriteCond %{HTTP_HOST} ^.*$ RewriteRule ^domainfolder/?$ "http\:\/\/www\.addondomain\.us" [R=301,L] It didt work though, ill try it without a / in cpanel |
|
#6
|
||||
|
||||
|
Ask Support to bring you to the X3 theme, then try again.
__________________
Follow me on Twitter! http://twitter.com/mrw |
|
#7
|
|||
|
|||
|
Ok, seams I was wrong, Cpanel is adding its code to the end of mine, but its just not doing anything.
RewriteCond %{HTTP_HOST} ^.*$ RewriteRule ^domainfolder/?$ "http\:\/\/www\.addondomain\.us" [R=301,L] Dont do a thing www.maindomain.co.uk/domainfolder/ still shows its contents and dont redirect domainfolder = addondomain folder name Quote:
|
|
#8
|
||||
|
||||
|
I think it may write better code and give you more options. There's no harm in trying.
Also, try temporarily clearing out your .htaccess (make sure to save the contents!) and only putting in the cPanel code. If it works, something already in there is interfering with it.
__________________
Follow me on Twitter! http://twitter.com/mrw |
|
#9
|
|||
|
|||
|
Hi
Its been a long day, they updated cpanel, and now I cant find anything so need to spend some time looking at it.They also gave be some code, but it goes inside the folder of the addon domain not the main domain, and its part working now RewriteEnginge On RewriteCond %{HTTP_HOST} maindomain.co.uk [NC] RewriteRule ^(.*)$ http://www.addondomain.us [R=301,L] Just needs a little tweek, as its not forwarding to the same "file" www.maindomain.co.uk/addondomain/ ok http://www.maindomain.co.uk/addondom...ome/index.html (just goes to the index of the addon domain) I did delete the .htaccess but cpanel only changes the main domain anyway, so no use there if its the addon domain that needs the edit. I replies to see if this can be done. The trouble is (If it is trouble) my main domain is number one in Google, and if I start putting the same pages in the .us domain they might just hurt the ranking I can cope with sub domains ok... Now I just clecked something in the new cpanel and have a network icon on my PC to ftp.fifi.org so now have to learn even more after this update.I dont seam to be able to find the bit where I could check any server erros, like 777 problems? |
|
#10
|
|||
|
|||
|
Quote:
|
|
#11
|
|||
|
|||
|
? huh and I posted something before that too ?
|
|
#12
|
||||
|
||||
|
Perhaps there was an image or other "blacklist" word in your post.
__________________
Follow me on Twitter! http://twitter.com/mrw |
|
#13
|
|||
|
|||
|
Ok..
I asked how I could change the code to foward to the right page Quote:
|
|
#14
|
|||
|
|||
|
Ok, got it at last
Quote:
|
|
#15
|
|||
|
|||
|
Still one problem, leave out a / and there is an error
![]() www.domain.co.uk/addondomainfolder/test/ OK www.domain.co.uk/addondomainfolder/test not ok |
|
#16
|
||||
|
||||
|
Put a redirect line before that one-- redirect non / to /, and then the next line will automatically grab it.
__________________
Follow me on Twitter! http://twitter.com/mrw |
|
#17
|
|||
|
|||
|
Sorry dont understand what your saying...
They did this now Quote:
it sends everything to the index again, and the non www dont work at all.You would think after all these years they would know, not sure if this can be done in just 2 lines |
|
#18
|
||||
|
||||
|
Who is "they"? If support is working on this then I would say they are going beyond what should be expected. This is a coding issue and I do not expect a hosting company support coding. This is especially true since you stated in the first post that the main domain and the addon domain were both working. You are trying now to use .htaccess to cover up default cPanel behavior when using an addon domain. If you really want the accounts completely separate then purchase another hosting account or get a reseller account and set them up separately.
|
|
#19
|
||||
|
||||
|
I would try this as the first line of your .htaccess:
Code:
Redirect 301 /addondomainfolder/test http://www.domain.co.uk/addondomainfolder/test/
__________________
Follow me on Twitter! http://twitter.com/mrw Last edited by slapshotw; 07-25-2008 at 08:59 AM. |
|
#20
|
|||
|
|||
|
GvilleRick, if you have no helpfull info please dont clog up the thread. No main domain should load a addon domain.
Slapshotw, thanks I will try that code now, but I dont know if can cope with all problems. Thinking its not going to work with just two lines, I added 4 lines, and now its almost fixed ![]() Quote:
![]() These redirect 100% http://www.maindomain.co.uk/addondomain/ http://www.maindomain.co.uk/addondomain/welcome/ http://www.maindomain.co.uk/addondomain/welcome http://www.maindomain.co.uk/addondom...ome/index.html Sadly this one shows the Public_Html path and username path http://www.maindomain.co.uk/addondomain |
|
#21
|
|||
|
|||
|
waiting for my post here to be approved AGAIN
|
|
#22
|
|||
|
|||
|
Code:
RewriteCond %{http_host} ^maindomain.co.uk [nc]
RewriteRule ^(.*)$ http://www.addondomain.us/$1 [r=301,nc]
RewriteCond %{http_host} ^www.maindomain.co.uk [nc]
RewriteRule ^(.*)$ http://www.addondomain.us/$1 [r=301,nc]
Code:
http://www.maindomain.co.uk/addondomain I get this ![]() Code:
http://www.addondomain.us//home/username/public_html/addondomain |
|
#23
|
||||
|
||||
|
Did you use my redirect line successfully? Can you put in another one for the final one that doesn't work?
__________________
Follow me on Twitter! http://twitter.com/mrw |
|
#24
|
||||
|
||||
|
Try this...
Code:
<IfModule mod_security.c> # Turn the filtering engine On or Off SecFilterEngine On # Rule to redirect sub-directory to add-on Domain SecFilterSelective REQUEST_URI "/AddOnDirectory$" "redirect:http://addondomain.com" </IfModule>
__________________
“There is a principle which is a bar against all information, which is proof against all arguments and which cannot fail to keep a man in everlasting ignorance—that principle is contempt prior to investigation.” —Herbert Spencer
|
|
#25
|
|||
|
|||
|
Quote:
Sorry, been to the beach for 2 days so looking into this again now, but its very hot here ![]() Quote:
Remember, there may be thosands of files, and 50+ folders, so I cant write a rule for each file or folder. Im testing this out on just one addon domain, and hope to get it to work with my other addon domains. I have many accounts with hostgator, and around 30 domains spread accross them, also some sub domains. Im looking at "what if" and perhaps some damidge already done in the search engines. The one Im working on has only 2 domains on this account, the main domain is number one in google search, I want it to stay that way ![]() So what if Code:
http://www.maindomain.co.uk/addondomain.us/ http://www.maindomain.co.uk/addondomain.us http://www.maindomain.co.uk/addondomain.us/welcome/ http://www.maindomain.co.uk/addondomain.us/welcome http://www.maindomain.co.uk/addondomain.us/welcome/index.html 1,3,4,5 are working, so why line 2 still wont work. Quote:
Thanks both Last edited by visitor; 07-27-2008 at 12:02 PM. |
![]() |
| Bookmarks |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
|
|
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:20 AM.





its driving me mad now.




