PDA

View Full Version : Mod Rewrite - adding the www


Illustrious
12 Jan 2007, 06:33
I'm just wondering what to put in the .htaccess in order for me to rewrite URLs to include the www.

For example, I want to change about example.com to www.example.com, how would I go about doing that?

Dismounted
12 Jan 2007, 07:02
Add this to your .htaccess file:


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------


Of course, replace YOURDOMAIN.COM with your domain.

Illustrious
12 Jan 2007, 07:05
That worked. Thanks. Now, I noticed it only rewrites the initial URL, is there a way for it to add it to each subsequent URL?

For example, change example.com/forums to www.example.com/forums or example.com/12324 to www.example.com/12324.