Addon domain problem

New to mod_rewrite? This is a good place to start.

Addon domain problem

Postby Me » Mon Oct 04, 2004 11:04 pm

Hi all,

I have an addon domain, addondomain.com, parked to mysite.com/addondomain.
When i try to access a gallery i installed on the addon domain (cpanel server), as http://addondomain.com/gallery, it got redirected to the subdomain - addondomain.mysite.com/gallery.
I resolved this by addign modifying my httpd.comf - serveralias addondomain.com www.addondomain.com *.addondomain.com.
Now, if i take http://addondomain.com/gallery/ in a browser, it does not redirect me to addondomain.mysite.com/gallery.
But if i try this without the trailing slash, http://addondomain.com/gallery, it gets redirected to the subdomain.

What i want is, when a user types in http://addondomain.com/gallery or http://addondomain.com/gallery/, he should be taken to the url http://addondomain.com/gallery/
But if he types in addondomain.mysite.com/gallery, he should not be redirected.
Can this be implemented using mod_rewrite, if so, can anybody provide the code?
Me
 

Return to Beginner's Corner

Who is online

Users browsing this forum: No registered users and 10 guests

cron