I'm trying to get some URLs pared down and cleaned for SEO purpose on an website I'm working on. The part where the actual URL is rewritten works just fine. The issue is that it gives me a 404 error page.
I'm new to using htaccess and have managed this far piecing things together.
Here is the code that's yielding this result.
Options +FollowSymLinks -MultiViews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^/cat/(.*)/$ /products.php?cat=$1
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
To repeat. Changing the URL as it appears in the address bar works, it not recognizing this as the page that is the problem.
Aucun commentaire:
Enregistrer un commentaire