RegExp and Apache RewriteEngine (missing www.)
Posted: Thu Feb 09, 2006 10:33 am
Hello together,
I would like to use Apaches mod_rewrite to redirect from http://webpage.com to http://www.webpage.com
The URL path may ofcourse hold a path of folders and some further parameters like so: http://webpage.com/folder1/folder2/mysr ... tion=start
RewriteCond %{HTTP_HOST} ^\.webpage\.com seems to be a good start. But how do I actually form the RewriteRule? I need to get hold of REQUEST_URI and QUERY_STRING (which can be empty or not). Howto?
Thanks,
visionmaster
I would like to use Apaches mod_rewrite to redirect from http://webpage.com to http://www.webpage.com
The URL path may ofcourse hold a path of folders and some further parameters like so: http://webpage.com/folder1/folder2/mysr ... tion=start
RewriteCond %{HTTP_HOST} ^\.webpage\.com seems to be a good start. But how do I actually form the RewriteRule? I need to get hold of REQUEST_URI and QUERY_STRING (which can be empty or not). Howto?
Thanks,
visionmaster