Click to See Complete Forum and Search --> : [RESOLVED] Subdirectories on Parked Domains


TJ111
09-17-2007, 10:50 AM
I recently migrated VPS hosting accounts from a Virtuozzo/Plesk based one to a WHM/cPanel one. Everything went pretty smooth, except for the issue of domain parking. I have 3 domains pointing to the same website, and in Plesk created Aliases of eachother, and this pointed to the same site but retained the user-entered domain in the address bar.

Now in cPanel I parked the domains on top of eachother, and all the top-level pages (not in subdirectories) work fine (returns 200-OK). However when an employee goes to login, it gives a 304 Found for the login script, but when the login script uses a header redirect to direct them to the correct page, it returns a 301 moved permanently status code. This then redirects them to the main domain name's logged in page, where they fail the user validation and get kicked back to the login page.

I've spent 2 days digging through httpd.conf and google trying to figure out what's causing this and how to fix it, but to so far no avail.

LeeU
09-17-2007, 05:01 PM
How about placing the following in the head section of the page and point it to the URL you want to use:

<base href="http://www.yourSite.com/">

TJ111
09-17-2007, 05:10 PM
Thanks for the tip, but I'm stilling getting 301's on my subdirectories

LeeU
09-18-2007, 09:24 AM
You still need to set-up 302 redirects as that is what they are doing, redirecting.

TJ111
09-18-2007, 09:49 AM
Turns out the solution was pretty simple. I just added "UseCanonicalName off" to the <virtualhost> section of the httpd.conf file.

LeeU
09-18-2007, 09:59 AM
Great, glad it worked out.

TJ111
09-18-2007, 10:02 AM
After banging my head against my desk for day's, I'm pretty glad as well:cool: