Forum Moderators: bakedjake
I NEED to make my domains put automatically the "www" and the last "/" when any page of the site without them is requested.
The same that happens everywhere on php.net. i.e:
[php.net...]
I think that what I have to do is to put a redirection to 301... but not sure of how I can do it.
I also thought it would be a matter of "httpd.conf", but my hoting provider told me that it can only be done by .htaccess. (though other servers as cobalt can do it themselves). It will be boring editting every htaccess of every domain, but if that's the way of doing it... it will have to be done.
I'm not sure if httpd.conf or htaccess, but anyway, I hope you can throw me a smalll light (or an url) on all this subject.
Thanks for your time!
Tardo
(I've tryed it on two different servers, and I'm going to try it on a third one more)
This is the final part of the alert, from the apache error_log:
RewriteCond: bad argument line '%{HTTP_HOST}!^www.my-domain-name.my-tld$' Thanks for your answer, though.
Just add:
Options +FollowSymlinks
On your .htaccess, the whole code would be like this:
Options +FollowSymlinks
RewriteEngine On
RewriteCond %{HTTP_host}!^www\.site-url-here\.com$
RewriteRule ^(.*)$ http://www.site-url-here.com/$1 [R=permanent,L]
PS: You can find this same question on the domain names forum:
[webmasterworld.com...]