RewriteCond command

lifeisjustabout nginx-forum at nginx.us
Wed Feb 2 07:12:37 MSK 2011


thanks Antonio

if i could find to change & to ? i am going to solve my problem


incorrect
http://www.mysite.com/search/web&search=katy%20perry&type=web

correct
http://www.mysite.com/search/web?search=katy%20perry&type=web



what should i add into my conf
server {
listen 81;
server_name *.mysite.ws;
access_log /var/log/mysite.access.log main;
error_log /var/log/mysite.error.log;
root /home/mysite/www;
index index.php index.html;

rewrite /(.*)(style\.css)$ /$2 last;
rewrite /(.*)(lightbox\.css)$ /$2 last;
rewrite /(.*)(userdata\/)(.*)$ /$2$3 last;
rewrite /(.*)(maps\/)(.*)$ /$2$3 last;
rewrite /(.*)(test\/)(.*)$ /$2$3 last;
rewrite ^/(.*)(index\.php)(\/?)(.*)$ /index.php?page=index/$4 last;
rewrite /(.*)(install\/)(.*)$ /$2$3 last;
rewrite /(.*)(addon\/)(.*)$ /$2$3 last;
rewrite /(.*)(cron\/)(.*)$ /$2$3 last;
rewrite /(.*)(js\/)(.*)(\.js)$ /$2$3$4 last;
rewrite /(.*)(images\/)(.*)(\.)(gif|jpe?g|png|ico)$ /$2$3$4$5 last;
rewrite ^/(.*)$ /index.php?page=$1 last;

location / {
try_files $uri $uri/ /index.php?q=$request_uri;
}

location ~ \.php$ {
root html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /home/mysite/www$fastcgi_script_name;
include fastcgi_params;
}
}

i couldnt convert this into my conf

RewriteCond %{request_uri} !^index\.php

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,171397,171425#msg-171425




More information about the nginx mailing list