I am trying to get mod_rewrite to work with my site but for some reason it’s not working.
I’ve already entered code into my .htaccess file to redirect non-www to www so I know mod_rewrite is working in general.
The url’s I’m trying to change are example.com/index.php?p=home so the new URL would be example.com/page/home
However, when I try this code I simply get a 404 telling me that /page/home doesn’t exist.
Options +FollowSymLinks
RewriteEngine on
RewriteRule index/p/(.*)/ index.php?p=$1
RewriteRule index/p/(.*) index.php?p=$1
Can anyone help me out please?
Your pattern doesn’t match your example URL. Assuming your example URL was correct, you wanted this instead: