PDA

View Full Version : Difficulty redirecting the root domain address



berserktripon
April 13th, 2013, 08:35 AM
Hello, I'm trying to redirect requests for my root address before I finish moving my domain URL over to point at hostek. I'm ditching GoDaddy, so please help!

I first simply tried adding 301 response redirects in my default.aspx file in the wwwroot/ folder, but I get referred to the parking page when I request http://blahblahblah-com.securec30.ezhostingserver.com/ . It's almost like hostek wasn't allowing the redirect there.


I then tried to use the ISAPI scripting as shown below. The redirects work if a user requests http://blahblahblah-com.securec30.ezhostingserver.com/default.aspx....it will go to http://blahblahblah-com.securec30.ezhostingserver.com/main/default.aspx

but not if the user leaves out the specific file...and simply punches in http://blahblahblah-com.securec30.ezhostingserver.com. In that case, you get the parking page.

Any help you could provide would be great, thanks. I have a few different applications running and it's just cleaner if I can put the main application in it's own folder.


my .htaccess file:

RewriteEngine On

# Also redirect the root folder.
RewriteCond %{HTTP_HOST} ^blahblahblah-com.securec30.ezhostingserver.com$
RewriteRule ^(/)?$ main/default.aspx [L]

#try to redirect root request
RewriteRule default.aspx main/default.aspx [I,O,R=301,L]


# Exclude requests already going to /subfolder to avoid an infinite loop
RewriteRule ^main.*$ - [NC,L]

# Rewrite normal requests to /subfolder
RewriteRule ^(.*)$ /main/$1 [L]

admin
April 13th, 2013, 11:32 AM
Hi,

It sounds like you still have the _holding.htm file in your wwwroot folder. This is a redirect to the holding (parked domain) page. Also, you shouldn't need the testing url domainname-com.secure30.ezhostingserver.com in your redirect. If you're wanting to redirect 'all' traffic to the default.aspx under the main folder using ISAPI_Rewrite, just keep the code you currently have:

RewriteEngine On
# Exclude requests already going to /subfolder to avoid an infinite loop
RewriteRule ^main.*$ - [NC,L]

# Rewrite normal requests to /subfolder
RewriteRule ^(.*)$ /main/$1 [L]

You can also do an IIS redirect to the /main folder. For more information please visit https://wiki.hostek.com/ISAPI_Rewrite or submit a support ticket at support.hostek.com (https://support.hostek.com) with your actual domain name.

Justin A.

berserktripon
April 14th, 2013, 12:10 PM
Hi,

It sounds like you still have the _holding.htm file in your wwwroot folder. This is a redirect to the holding (parked domain) page. Also, you shouldn't need the testing url domainname-com.secure30.ezhostingserver.com in your redirect. If you're wanting to redirect 'all' traffic to the default.aspx under the main folder using ISAPI_Rewrite, just keep the code you currently have:

Justin A.

Thanks so much Justin, I think I may have made a discovery. (disclaimer : I'm by no means an expert at the DNS system) . The _holding.htm was long gone, so that wasn't the cause.

I have not yet moved my domain names over to Hostek and I'm trying to check to see how this pseudo/temp name you get when you sign up for hosting works...prior to moving over domain records (kind of chicken and egg, you know).

I own the .com and .info for my website and both domains are registered with godaddy. For the .info, I've directed it here via an A record in godaddy's nameservers and listed it as a "domain alias" here with hostek in the control panel. When I type in www.blahblahblah.info with what you listed above, Voila! Right to main/default.aspx. It's only when I type in http://blahblahblah-com.securec30.ezhostingserver.com that it goes to the parked page. So two guesses here (1) if I simply move over the .com (reconfigure in godaddy) it will start working in the fashion of the .info...there's no difference. (2) I wonder if there is a higher-level ISAPI filter at play here that is intercepting and redirecting the request when it sees a fake/holder address and assumes you're trying to load a parked website.

Anyway, no bother, I'm going to try and simply redirect the .com address, see what happens. Again, thanks for your suggestion, it appears your ISAPI suggestion was what I needed.

BrentB
April 14th, 2013, 01:11 PM
Hello,

Please visit support.hostek.com and submit a ticket on this issue. You can reference this forum post for background information. Our team will then research the issue and help you to resolve.

Thank you!