: Rewrite rule for friendly URLs to index.php is not working from htaccess Trying to get SEO Friendly URLs to work for my website using the following htaccess: RewriteBase / RewriteCond %{REQUEST_FILENAME}
Trying to get SEO Friendly URLs to work for my website using the following htaccess:
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-l
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^explore/(.*)$ index.php?page=explore&type=
RewriteRule ^(.*)$ index.php?page=
E.g. it should load /index.php?page=test for /test/ and /index.php?page=explore&type=1 for /explore/1.
However it's not working, does anyone know how I could get this to work?
More posts by @Margaret670
1 Comments
Sorted by latest first Latest Oldest Best
You have RewriteEngine On missing
RewriteCond are only applicable to next immediate RewriteRule
Try this code:
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-l
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^explore/(.*)$ index.php?page=explore&type= [L]
RewriteCond %{REQUEST_FILENAME} !-l
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?page= [L]
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.