Rewrite rule to add missing www

RewriteEngine on RewriteCond %{SERVER_NAME} !^www\..*$ RewriteRule ^/(.*)$ http://www.%{SERVER_NAME}/$1 [L,QSA,R=302] From the manual, using %1 as a back reference from the RewriteCond in the RewriteRule should work, but it didn't on my installation. Weird....

Multiple domains for one symfony project, the basics 4

So let's say you run a car franchise, and you have several shops that you want to be able to manage through a web application. The application would be same for each shop, except you'd have to manage different sets of data and have specific assets for each shop. Fear not, this is very easy to...

Apache and mod_rewrite to subdirectories 3

Naneau just poke me with a little problem he had with mod_rewrite when trying to rewrite to a subdirectory. Imagine you've got the following setup: Apache's document root is /document_root/ You application's bootstrap is /document_root/public/index.php You could come to the following rewrite rules...

Top tags