Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: modules/adblockplusorg/files/adblockplus.org

Issue 9103016: Fix url-based rewrites (Closed)
Patch Set: Made browser rewriting work for /en/ etc. Created Jan. 9, 2013, 10:43 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: modules/adblockplusorg/files/adblockplus.org
===================================================================
--- a/modules/adblockplusorg/files/adblockplus.org
+++ b/modules/adblockplusorg/files/adblockplus.org
@@ -29,7 +29,7 @@
if ($arg_a ~ ^(view|show)?$) {
rewrite ^/(index\.html)?$ /$preferredLang/$browser redirect;
- rewrite ^/(\w\w(_\w\w)?)$ /$1/$browser redirect;
+ rewrite ^/(\w\w(_\w\w)?)/?$ /$1/$browser redirect;
}
rewrite ^/(\w\w(_\w\w)?)/installation$ /$1/ permanent;
@@ -43,7 +43,7 @@
}
set $static_uri $uri;
- if ($uri ~ ^/(\w\w(_\w\w)?)/(firefox|chrome|opera|android)) {
+ if ($uri ~ ^/(\w\w(_\w\w)?)/(firefox|chrome|opera|android)/?$) {
set $static_uri "/$1/";
set $browser $3;
}
@@ -59,7 +59,7 @@
rewrite ^ /static$static_uri?browser=$browser last;
}
- rewrite ^/(\w\w(_\w\w)?)/(firefox|chrome|opera|android) /index.php?p=$1&browser=$3 last;
+ rewrite ^/(\w\w(_\w\w)?)/(firefox|chrome|opera|android)/?$ /index.php?p=$1&browser=$3 last;
rewrite ^/(.*) /index.php?p=$1 last;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld