Welcome Guest, Not a member yet? Register   Sign In
HTACCESS: Force www
#1

[eluser]codex[/eluser]
I have this, which is working alright. But I'm wondering if the domain itself can be made dynamic (so without explicitly entering the domain).

Code:
RewriteCond %{HTTP_HOST} ^domain.nl [NC]
RewriteRule ^(.*)$ http://www.domain.nl/$1 [L,R=301]
#2

[eluser]Kopel[/eluser]
I'm looking for the same thing.
The goal is to have a htaccess file that works on local and on production without any update.
#3

[eluser]TheFuzzy0ne[/eluser]
Please see my first post in [url="http://ellislab.com/forums/viewthread/105759/"]this thread[/url].
#4

[eluser]Kopel[/eluser]
It works, thanks TheFuzzy0ne! Smile

Code:
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]




Theme © iAndrew 2016 - Forum software by © MyBB