I am trying to get a pretty permalink system set up on a site I've just built and nothing is having any effect. I either get a 500 error or the permalinks don't work and/or it breaks all the links to CSS and images while still giving a 404 if you try to use the permalink structure.
Here is my .htaccess code:
RewriteEngine On
RewriteRule ^([^/]*)/([^/]*)/([^/]*)$ /main/index.php?act=$1&sub=$2&id=$3 [L]
I want it to convert links like index.php?act=admin&sub=edit-product&id=5
to /admin/edit-product/5
whilst including any in between. For example, if a URL has an ID call but not a sub call it will still work.
Any help would be greatly appreciated.
UPDATE:
I have added RewriteBase /
and it has now doing something, but the permalinks are not working properly.
Is there a way I can find out where the rewritten URL is actually pointing?
It seems that full URLs that use all the rewrite rules work, but not the URLs that only need some of them.