Merge pull request #549 from asgoodasnu/redirect_with_params

do www-rewrite with params
This commit is contained in:
James Fryman 2015-02-05 14:08:15 -06:00
commit a212b4855b
3 changed files with 8 additions and 8 deletions

View file

@ -53,7 +53,7 @@ describe 'nginx::resource::vhost' do
^
\s+listen\s+\*:80;\n
\s+server_name\s+www\.rspec\.example\.com;\n
\s+return\s+301\s+http://rspec\.example\.com\$uri;
\s+return\s+301\s+http://rspec\.example\.com\$request_uri;
|x,
},
{
@ -64,7 +64,7 @@ describe 'nginx::resource::vhost' do
^
\s+listen\s+\*:80;\n
\s+server_name\s+www\.rspec\.example\.com;\n
\s+return\s+301\s+http://rspec\.example\.com\$uri;
\s+return\s+301\s+http://rspec\.example\.com\$request_uri;
|x,
},
{
@ -276,7 +276,7 @@ describe 'nginx::resource::vhost' do
^
\s+listen\s+\*:443\s+ssl;\n
\s+server_name\s+www\.rspec\.example\.com;\n
\s+return\s+301\s+https://rspec\.example\.com\$uri;
\s+return\s+301\s+https://rspec\.example\.com\$request_uri;
|x,
},
{
@ -341,7 +341,7 @@ describe 'nginx::resource::vhost' do
^
\s+listen\s+\*:443\s+ssl;\n
\s+server_name\s+www\.rspec\.example\.com;\n
\s+return\s+301\s+https://rspec\.example\.com\$uri;
\s+return\s+301\s+https://rspec\.example\.com\$request_uri;
|x,
},
{
@ -352,7 +352,7 @@ describe 'nginx::resource::vhost' do
^
\s+listen\s+\*:443\s+ssl;\n
\s+server_name\s+www\.rspec\.example\.com;\n
\s+return\s+301\s+https://rspec\.example\.com\$uri;
\s+return\s+301\s+https://rspec\.example\.com\$request_uri;
|x,
},
{
@ -597,7 +597,7 @@ describe 'nginx::resource::vhost' do
^
\s+listen\s+\*:443\s+ssl;\n
\s+server_name\s+www\.rspec\.example\.com;\n
\s+return\s+301\s+https://rspec\.example\.com\$uri;
\s+return\s+301\s+https://rspec\.example\.com\$request_uri;
|x,
},
{

View file

@ -2,7 +2,7 @@
server {
listen <%= @listen_ip %>:<%= @listen_port %>;
server_name www.<%= @server_name[0].gsub(/^www\./, '') %>;
return 301 http://<%= @server_name[0].gsub(/^www\./, '') %>$uri;
return 301 http://<%= @server_name[0].gsub(/^www\./, '') %>$request_uri;
}
<% end -%>

View file

@ -2,7 +2,7 @@
server {
listen <%= @listen_ip %>:<%= @ssl_port %> ssl;
server_name www.<%= @server_name[0].gsub(/^www\./, '') %>;
return 301 https://<%= @server_name[0].gsub(/^www\./, '') %>$uri;
return 301 https://<%= @server_name[0].gsub(/^www\./, '') %>$request_uri;
}
<% end -%>