rewrite rules

HonDev Developer developerhondev at gmail.com
Tue Jan 29 01:51:19 MSK 2008


I would start with something like this:

location ~* ^.+\.(html|jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|mid|midi|wav|bmp|rtf|js)$
{
root /home/vbseo/public_html;
rewrite ^/archive/(.*(html|jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|mid|midi|wav|bmp|rtf|js))$
/vbseo.php?vbseourl=$1 last;
expires 10d;
break;
}

location / {
root   /home/vbseo/public_html;
index  index.php;
if (!-e $request_filename) {
rewrite ^(.+)$ /vbseo.php?vbseourl=$1 last;
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx/attachments/20080129/d407d286/attachment.html>


More information about the nginx mailing list