I have this folder system:
localhost/websites/2018/mywebsite
And there I have this file:
products.php
so the full route I type in my browser to access it is:
localhost/websites/2018/mywebsite/products.php
Now, I'm trying to use mod_rewrite to get this:
products.php?cat1=a&cat2=b&cat3=c
into this:
shop/a/b/c
So the full url would be:
localhost/websites/2018/mywebsite/shop/a/b/c
I tried putting the .htaccess in here:
localhost/websites/2018/mywebsite
with this code:
RewriteEngine On
RewriteRule ^shop/([^/]*)/([^/]*)/([^/]*)$ /products.php?cat1=$1&cat2=$2&cat3=$3 [L]
But when I go to
localhost/websites/2018/mywebsite/shop/
I get a 404. I think it has to do with the directory tree because when I upload it to the website (root directory) it works fine.
Edit: I tried using
RewriteBase localhost/websites/2018/mywebsite
And some variations but it didn't work. It threw 500 server error.