Created
February 29, 2016 03:48
-
-
Save mikeyhill/fe3362025d4dded2b8a8 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
#RewriteCond %{HTTP_HOST} !^www\. | |
#RewriteRule ^(.*)$ http://www.%{HTTP_HOST}$1 [R=301,L] | |
# | |
## rewrite non www -> www | |
# | |
server { | |
listen 80; | |
server_name domain.com; | |
rewrite ^(.*)$ $scheme://www.domain.com$1; | |
} | |
##################################################################### | |
#RewriteRule ^/gallerier/(.*) /gallerier.asd?id=$1 [R=303,L] | |
# | |
## single page rewrite with querystring | |
# | |
location /gallerier { | |
rewrite ^/gallerier/(.*) /gallerier.asd?id=$1 redirect; | |
} | |
##################################################################### | |
# | |
## RewriteRule ^/images/(.*) /images.asd?id=$1 [L] | |
# | |
location /images { | |
rewrite ^/images/(.*) /images.asd?id=$1 break; | |
} | |
##################################################################### | |
## RewriteCond %{REQUEST_FILENAME} ^/[^.]+$ [NC] | |
## RewriteCond %{REQUEST_FILENAME} !^/[^.]+\.asd$ [NC] | |
## RewriteRule ^/(.*) /gallerier.asd?urlusername=$1&%1 [L] | |
if ($request_filename ~ ^/[^.]+$) { | |
rewrite ^/(.*) /gallerier.asd?urlusername=$1&%1 break; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment