Web Hosting Forum | Lunarpages
News: October 6, 2008 - Submit Your Site for the October 2008 Site of the Month!
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
October 13, 2008, 08:58:08 AM


Login with username, password and session length


Pages: [1]   Go Down
  Print  
Author Topic: Sub-domain address won't stay in the address bar.  (Read 623 times)
bimdas
Newbie
*
Offline Offline

Posts: 2


« on: January 25, 2008, 06:02:08 PM »

I've set up some sub-domains on my site. A simple procedure only that when I go to the sub-domain, the address reverts back to the original full link. This is very annoying as any add-on domains I set up seem to automatically point to a sub-domain which reverts back to the full link. Anyone else had this problem or knows a solution? I've tried the ticketing system but I need a quick solution.

thanks
Logged
MrPhil
Quantum Encyclopedia Writer
*****
Offline Offline

Posts: 3400



« Reply #1 on: January 26, 2008, 10:07:03 AM »

So, subd.primary.com shows up in the address bar as primary.com/subd/, and addon.com shows up as primary.com/addon/ or possibly addon.primary.com? In public_html/.htaccess add the following:

RewriteEngine On    # only add this line if not already present
# clean up subdomains and add-on domain names
RewriteRule  ^subd/?(.*)$  http://subd.primary.com/$1  [R=301,NC]
RewriteRule  ^addon/?(.*)$  http://www.addon.com/$1  [R=301,NC]
RewriteCond  %{HTTP_HOST}  ^addon\.primary\.com   [NC]
RewriteRule  ^(.*)$   http://www.addon.com/$1  [R=301,NC,L]
Logged

bimdas
Newbie
*
Offline Offline

Posts: 2


« Reply #2 on: January 27, 2008, 07:12:11 AM »

thanks for the reply, the ticketing system people have helped somewhat but there are still problems with my subdomains reverting back. My add-on only works if I leave out the www. at the start. If I add it on it reverts back to my root index.

Thanks for your tip, I'll try it out. Am I the only one having these problems?
Logged
RichardRay
Support
Spaceship Navigator
*****
Offline Offline

Posts: 77



« Reply #3 on: February 14, 2008, 10:21:51 PM »

It sounds like this may be an issue with the Apache configuration if you don't have any custom DNS records or rewrites setup in your .htaccess files.  If this is the case, server administrators would need to correct the config to correct this.
Logged

Lunarpages Web Hosting
Lunarpages Affiliate Program
FAQs | Tutorials | LP Glossary

Telephone: 1-714-521-8150
24 hour Network Status Line: 1-562-697-8106
Fax: 1-714-521-8195
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.6 | SMF © 2006-2008, Simple Machines LLC

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM