Created
October 29, 2009 04:17
-
-
Save pcdinh/221144 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## 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