I have the following code written in my .htaccess
document
RewriteEngine On
# If you need to use the `RewriteBase` directive, it should be the
# absolute physical path to the directory that contains this htaccess file.
#
# RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^category/([a-z]+)/?$ searchPage.php?crs_category=$1
RewriteRule ^ index.php [QSA,L]
the problem I think occurs in the following line:
RewriteRule ^category/([a-z]+)/?$ searchPage.php?crs_category=$1
Essentially I want when a user type searchPage.php?crs_category=business
it rewrite the url to category/business
or category/business/
or category/BUSinesS/
or category/BUsineSS
As it stands the following problems with this line is as follow:
- the css/js seems to load
- it only works when i type category/business/ if i type searchPage.php?crs_category=business it does not redirect or rewrite to the clean URL