I have recently started using nginx with PHP-FPM to serve PHP files, and this is blazing fast. However, where there are rewritten URLs, Apache becomes a bottleneck. How can I have nginx do the rewriting?
Let's say that I'm trying the following kind of rewrite in Apache:
The equivalent code for nginx should be something like this:
But I'm not sure...
URL re-writing using nginx?
Let's say that I'm trying the following kind of rewrite in Apache:
Code:
RewriteRule /cat/([0-9]*) /index.php?cat=$1 [NC]
Code:
location ~ /cat/(.*) { return 301 /index.php?cat=$1 last; }
URL re-writing using nginx?