1

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

1 Answer 1

0

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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