PDA

View Full Version : DNS + mode_rewrite


Gross
09-17-2004, 02:38 PM
I have http://www.site.com/info.php?p=health
I want to obtain http://www.health.site.com/

Go into control DNS I add:

www.* A 64.64.64.64
* A 64.64.64.64

All

* A 64.64.64.64
ftp A 64.64.64.64
site.com. A 64.64.64.64
localhost A 64.64.64.64
mail A 64.64.64.64
pop A 64.64.64.64
test A 64.64.64.64
www A 64.64.64.64
www.* A 64.64.64.64
www.test A 64.64.64.64
site.com. NS ns1.host.com.
site.com. NS ns2.host.com.
mail MX 10

Further .htaccess
RewriteCond %{HTTP_HOST} (.+)\.lhost.com$
RewriteRule index.html /path/to/dir/%1.html

Accordingly http://httpd.apache.org/docs-2.0/misc/rewriteguide.html

Prompt that I do make not correctly?

Gross
09-17-2004, 02:46 PM
And for http://www.site.com/info.php?p=my%20health
or http://www.site.com/info.php?p=my+health
I want to obtain http://www.my.health.site.com/

jmstacey
09-17-2004, 05:43 PM
If your attempting to make the info.php forward to http://www.my.health.site.com/
I believe you can do that through the control panel in site redirection.

Otherwise if I'm understanding you correctly, if the info.php is loaded with info.php?p=health
you want it to forward to http://www.my.health.site.com/ you should do it within the php file itself since it is much easier. Although I may be missing something since this isn't really dns related, so are you trying to accomplish something else?