.htaccess - add www to htaccess for contextdependant urls -


i know his

rewriteengine on rewritecond %{http_host} ^yourdomain\.net$ rewriterule (.*) http://www.yourdomain.net/$1 [r=301,l] 

however, not know beforehand domainname (it can 1 of 30). possible make yourdomain.com variable matches 30 possible domains?

you don't need match 30 domains:

rewriteengine on rewritecond %{http_host} !^www\. [nc] rewriterule (.*) http://www.%{http_host}/$1 [r=301,l] 

Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -