New answers tagged

0

server { listen 80; listen 443 ssl; server_name devly.co www.devly.co; ssl on; ssl_certificate /var/www/devly.co/cert/ssl-bundle.crt; ssl_certificate_key /var/www/devly.co/cert/devly_co.key; access_log /var/log/nginx/devly.co.access.log rt_cache; error_log /var/log/nginx/devly.co.error....


0

for the just the home page and nothing else, i would use: location / { rewrite ^/$ /blog/ redirect; } anything else, like /foo/ would not be redirected to /blog/ .


2

I bumped into the same issue when trying to setup NGINX to serve WebP files from the same filename as JPG/PNG's and certain files were containing spaces. The reason why it happens like this is: space cannot be used inside of an URL and browsers replace it automatically inside the URL with %20, as you might be aware​ the $uri variable in this case will ...


0

RewriteCond %{HTTP_HOST} (^www.)?mydomain.com/?$ [NC] RewriteRule ^(.*)$ https://myotherdomain.com/$1 [R=301,L] Which works with point #2 But the "problem" with this is that it redirects everything, not just /about-us, which is what you've stated as the requirements for point #2. (^www.)?mydomain.com/?$ - You've put the start-of-string anchor (^) ...


Top 50 recent answers are included