Reputation: 41
I need this
www.mydomain.com/apple
www.mydomain.com/banana
www.mydomain.com/mango
to
www.mydomain.com/search.php?q=apple
www.mydomain.com/search.php?q=banana
www.mydomain.com/search.php?q=mango
This is not working
My website go in 404 page
My .htaccess
Options +FollowSymLinks
RewriteEngine onRewriteRule ^(.*) search.php?q=$1
Upvotes: 2
Views: 32
Reputation: 41219
Options +FollowSymLinks
RewriteEngine on
#If the request is not for an existent directory
RewriteCond %{REQUEST_FILENAME} !-d
#And file
RewriteCond %{REQUEST_FILENAME} !-f
#Then rewrite the request
RewriteRule ^(.*)$ /search.php?q=$1
Upvotes: 1