homepage Welcome to WebmasterWorld Guest from 54.234.147.84
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

    
Trailing Slash Problem
... caused by add-on domain
michael heraghty




msg:1502952
 7:47 pm on Sep 22, 2005 (gmt 0)

I am hosting several sites on the same hosting space, using the "addon domains" service provided by the host.

Recently, I have noticed a problem with certain URLs (I'm convinced this only started happening in the last month or so, else I'm sure I would have noticed it -- but that's not the issue).

Let's say my domain is called foo.com. When I create a new add-on domain, let's say bar.com, the control panel automatically does the following:

1. It creates a subdirectory -- www.foo.com/bar/
2. It creates a subdomain -- bar.foo.com
3. It creates a main domain -- www.bar.com

All three resolve to the same website (presumably the control panel does some mod rewriting on the fly?). As far as my site visitors are concerned, I only want them to see the #3 address. This solution works fine...

... or, it did, until I recently noticed that if the user types www.bar.com/subdirectory -- without the trailing slash -- then the domain name automatically switches to foo.bar.com/subdirectory/

Is there any way to fix this so that the user doesn't see any mention of "foo", even if he leaves out the trailing slash on a directory name?

I should point out that I am a novice - I understand basically what a .htaccess file is, and how to create one, but that's about it!

Any help would be greatly appreciated...

 

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved