Welcome! Log In Create A New Profile

Advanced

Rewrite rules not working

November 10, 2022 01:07PM
Hi Team,

I am trying to write a below rewrite rule but somehow this is not working and I would really appreicate if someone can help me on this?

I have a website http://web1.example.local/web1
Instead I need a rewrite so that if user enters http://web1.example.local it will be diverted to http://web1.example.local/web1

server {
listen 80;
server_name web1.example.local;
add_header X-Frame-Options "SAMEORIGIN";
access_log /var/log/nginx/web1/access.log;
error_log /var/log/nginx/web1/error.log;
rewrite ^ http://web1.example.local
Subject Author Posted

Rewrite rules not working

blason November 10, 2022 01:07PM

Re: Rewrite rules not working

Francis Daly November 11, 2022 03:54AM

Re: Rewrite rules not working

blason November 11, 2022 08:29AM

Re: Rewrite rules not working

Francis Daly November 11, 2022 03:02PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 77
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready