I know this answer is most answered, but i can't find the solution for me. I have written an .htaccess file for url rewriting. I have some pages whit GET url, like:
example.com/home.php?page=profile
example.com/home.php?page=forum
example.com/home.php?page=product&id=1
I need to redirect from example.com/home.php?page=forum to example.com/home/forum
So, this is the htaccess
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{HTTP_HOST} ^example\.com [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301]
RewriteRule ^/home/([A-Za-z0-9-]+)/?$ home.php?page=$1 [L,R=301]
SecFilterEngine Off
<Files .htaccess>
order allow,deny
deny from all
</Files>
Options All -Indexes
When i type in the URL: example.com/home/forum, I've been redirect to example.com/home.php?page=forum so, the reverse functiom. What I'm doing wrong?