Hello everyone. I am having an issue with creating a rewrite for blog posts. Here is my .htaccess file.
It doesn't work as intended.
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [QSA,L]
RewriteRule ^views/blog/?$ page.php?slug=/blog/ [L]
RewriteRule ^views/blog/(.*)/?([0-9]*) page.php?page_slug=/blog/$1/$2 [L]
index.php file points to the index.php in the views folder.
Here is my folder stucture: root folder > views > blog > page.php
The structure I'm trying to create is the following for any blog posts to be: mydomain.com/blog/post-title
Any help would be much appriciated.