Apache

How to discard the query string in a RewriteRule (Apache, mod_rewrite)

Removing the query string in a rewrite rule of Apache’s module mod_rewrite is a bit tricky. Let’s say you want to redirect the url http://www.example.com?query=test to http://www.example.com/noqueries in Apache with mod_rewrite enabled. Rewriting the URL is no problem but Apache always appends the original query string (?query=test) to the resulting URL which we don’t want in this example. If you’re using Apache 2.4 or later you can use the QSD option (qsdiscard) to remove the query string like this: … »

Flexible domain mapping to symfony apps

Here is a quick tip for your symfony 1.3⁄1.4 project (this probably works with other versions as well) hosted on an Apache webserver: So you fleshed out your symfony project and you ended up with several apps, all being available under their controller name frontend.php, anotherfrontend.php etc. For your routing (and maybe SEO purposes) its a bit unsatisfying that only one app in the project can be available without adressing its front controller (using the no_script_name setting in settings. … »