RE: Location Rewrite Issue

2019-08-17 Thread Reinis Rozitis
> Thank you. That was indeed the issue. Now I can see the individual blog > entries at /blog/slug-of-blog > > but /blog and /blog/ urls are both throwing a 404. > > Is that an easy fix? > >> rewrite ^/blog/([A-Za-z0-9-]+)/?$ /blog-article.php?slug=$1 break; You have to tweak the regex -

Re: Location Rewrite Issue

2019-08-16 Thread Randy Johnson
Thank you. That was indeed the issue. Now I can see the individual blog entries at /blog/slug-of-blog but /blog and /blog/ urls are both throwing a 404. Is that an easy fix? -Randy On Fri, Aug 16, 2019 at 5:15 AM Reinis Rozitis wrote: > > I tried adding the following line in there in a

RE: Location Rewrite Issue

2019-08-16 Thread Reinis Rozitis
> I tried adding the following line in there in a couple different places but > all it does is download the php file. > > location /blog { > rewrite ^/blog/([A-Za-z0-9-]+)/?$ /blog-article.php?slug=$1 break; > } Try to switch from 'break' to 'last'. By using 'break' it means that nginx stops

Location Rewrite Issue

2019-08-15 Thread Randy Johnson
Here is the locations part of my nginx host file: server { root /var/www/html; index index.php index.html index.htm index.nginx-debian.html; location / { try_files $uri $uri/ @extensionless-php; } location ~ \.php$ { include