Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

How to translate the example URL to the needed one?

From

http://test.at.domain.com

To

http://domain.com/at/index.php?at=test

I have:

RewriteEngine on
RewriteCond %{HTTP_HOST} (\w+).at.domain.com [NC]
RewriteRule .* http://domain.com/at/index.php?at=%1 [L]

however, the browser says "it says sorry this site is not currently available" it's form godaddy.com

share|improve this question
add comment

1 Answer

The browser saying "this site is not available" is not promising, you should (if you can) enable more verbose logging on the server side to see exactly what is happening. You should also paste both the From and To URLs into this useful header analysis webtool and add the details they give you into your question. It will help determine if the error you are getting is a "dns says there is no such URL" or a "server is misconfigured" error, or... whatever :)

Regarding the RewriteCond/Rule you have, as noted in this forum post you need to should escape those periods in your RewriteCond, and make sure that you explicitly call a redirect instruction (assuming you want it permanent vs temp) and may as well specify 'No case' too:

RewriteEngine on
RewriteCond %{HTTP_HOST} (\w+)\.at\.domain\.com [NC]
RewriteRule .* http://domain.com/at/index.php?at=%1 [R=301,NC,L]

Confirm too that just going directly to http://domain.com/at/index.php?at=test does work.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.