I have been working on getting friendly URLs to work.
On my site I have something like this:
http://www.example.com/blog/newpost.php?id=Reasons+to+Use+a+Small+Business+Consultant
I would like it to look something like this:
http://www.example.com/blog/Reasons+to+Use+a+Small+Business+Consultant
I have tried to edit both the httpd.conf and the .htaccess and get no response.
httpd.conf:
<VirtualHost *:80>
ServerName example.com
Redirect permanent / http://www.example.com/
</VirtualHost>
<VirtualHost *:80>
DocumentRoot /var/www/sites/example
ServerName www.example.com
<Directory /var/www/sites/example/blog>
Options FollowSymLinks MultiViews
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
.htaccess:
RewriteEngine On
RewriteRule ^blog/Reasons+to+Use+a+Small+Business+Consultant$ blog/newpost.php?id=Reasons+to+Use+a+Small+Business+Consultant
LogLevel alert rewrite:trace3
The trace log says it is apply the pattern however I still see:
http://www.example.com/blog/newpost.php?id=Reasons+to+Use+a+Small+Business+Consultant
[Thu Oct 25 18:39:17.821619 2018] [rewrite:trace3] [pid 27933] mod_rewrite.c(470): [client 123.321.64.56:58790] 123.321.64.56 - - [www.example.com/sid#558610b6a4a8][rid#558610d3d740/initial] [perdir /var/www/sites/example/blog/] strip per-dir prefix: /var/www/sites/example/blog/newpost.php -> newpost.php, referer: http://www.example.com/blog/
[Thu Oct 25 18:39:17.821648 2018] [rewrite:trace3] [pid 27933] mod_rewrite.c(470): [client 123.321.64.56:58790] 123.321.64.56 - - [www.example.com/sid#558610b6a4a8][rid#558610d3d740/initial] [perdir /var/www/sites/example/blog/] applying pattern '^blog/Reasons+to+Use+a+Small+Business+Consultant$' to uri 'newpost.php', referer: http://www.example.com/blog/
[Thu Oct 25 18:39:17.821654 2018] [rewrite:trace1] [pid 27933] mod_rewrite.c(470): [client 123.321.64.56:58790] 123.321.64.56 - - [www.example.com/sid#558610b6a4a8][rid#558610d3d740/initial] [perdir /var/www/sites/example/blog/] pass through /var/www/sites/example/blog/newpost.php, referer: http://www.example.com/blog/