I have a site that I would like to use Apache's RewriteRule to rewrite URLs. I want:
I have AMPPS installed on my Mac and I added the following lines to httpd.conf
and they work successfully:
RewriteEngine On
RewriteRule ^/p/(.*) /index.php?p=$1 [PT]
I'm trying to do the same but on my server.
And I have added the same apache code to /public_html/.htaccess
but I get the error message below:
Not Found
The requested URL /p/home was not found on this server. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
The exact same code works on my localhost server. Why not on my website?