Redirecting domain.com to www.domain.com
Ok the subject says it well enough. I have domain.com and want it so anytime that someone types domain.com it automagically redirects to www.domain.com, same for pages, such as domain.com/content.php should redirect to www.domain.com/content.php. I have read a few posts on 301 redirects but can't seem to get it to work. I can do this on the httpd.conf level or in the .htaccess file for the domain, either works. Here is my current Virtual host enty for this domain:
Code:
<VirtualHost xx.xx.xx.xx> |
Hi,
Just a quick note, you can use "redirect" directive, I am not sure if it handle Regular expression. you can also do this programmatically from within your Scripts. |
I had tried a redirect but I wasn't working. I assume somehting was wrong with my code. My provider got it working and i'm waiting for the code he used so I can figure out what I did wrong. I'll post it here once I have it, so others can see for future ref.
|
It should be something like:
Code:
ServerName www.domain.com |
All times are GMT -5. The time now is 03:57 PM. |