Skip to content

Instantly share code, notes, and snippets.

@pcdinh
Created October 29, 2009 04:17
Show Gist options
  • Save pcdinh/221144 to your computer and use it in GitHub Desktop.
Save pcdinh/221144 to your computer and use it in GitHub Desktop.
## The Desire is to have http://www.domain.com/index.cfm?menu=web&page=web_main rewrite to http://www.domain.com/web-consulting
## The Current rewritten result is http://www.domain.com/web-consulting?menu=web&page=web_main
## Looking for suggestions on how to drop the $query_string so that it's not appended to the rewritten url.
server {
listen 80;
server_name .domain.com domain.com;
location / {
if ($host != www.domain.com) {
rewrite (.*)$ http://www.domain.com$1 permanent;
}
set $rewrite_flag "";
if ($uri = index.cfm) {
set $rewrite_flag "URI";
}
if ($query_string ~ "menu=web&page=web_main") {
rewrite ^ /web-consulting? permanent;
break;
}
proxy_pass http://localhost:8080/VirtualHostBase/http/www.domain.com:80/effbis/VirtualHostRoot/;
proxy_redirect default;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment