My .htaccess works fine on hosting companies servers.
I am having problems enabling mod rewrite on apache on my local server
I have decided to put the rewrite within the http.conf, rather than .htaccess. I think the problem lies within the <directory/></directory> tags. I have removed the # from the loadmodule and put this between the directory tags:
<Directory "C:/Program Files/xampp/htdocs/browsebooks_php">
RewriteRule ^books(.*)$ /ext_profile.php?book_id=$1&sub_id=$2
RewriteRule ^subcategory(.*)$ /subcat.php?sub_id=$1
RewriteRule ^non-fiction(.*)$ /cat.php?cat_non_fiction_id=$1
RewriteRule ^fiction(.*)$ /cat.php?cat_fiction_id=$1
RewriteRule ^children(.*)$ /cat.php?cat_children_id=$1
RewriteRule ^academic(.*)$ /cat.php?cat_academic_id=$1
Deny from all
These rewrite rules work on the host's server.
When I restart apache I get a 403 forbidden error. I assume this is due to the forbidden subfolder in the htdocs folder which xampp puts there, but I don't know how to correct it.
Any help would be appreciated.