New answers tagged rewrite
1
vote
Regex to remove certain patterns from urls
If all your URIs should match the pattern you given (two letter prefix before the locale part):
rewrite "^(/\w{2})/en-(?:us|gb)(/.*)" $1$2 permanent;
(regex pattern should be quoted due to ...
1
vote
What is the difference between Nginx variables $host, $http_host, and $server_name?
TL;DR: If you don't use regular expressions in server_name you can ignore this answer 😉.
Since this aspect hasn't been mentioned at all in other answers, but it's something that I found somewhat ...
Top 50 recent answers are included
Related Tags
rewrite × 2054nginx × 891
apache-2.2 × 390
mod-rewrite × 357
.htaccess × 303
iis × 220
redirect × 201
url × 146
apache-2.4 × 106
reverse-proxy × 102
iis-7 × 92
php × 74
regex × 64
wordpress × 55
rewritecond × 55
proxy × 54
iis-7.5 × 46
301-redirect × 46
https × 39
virtualhost × 38
linux × 34
apache2 × 34
subdomain × 34
php-fpm × 33
web-server × 32