PHP rewriting using .htaccess

http://domain name/menu /food/select.php?id=183

Can someone show me how to do the rewriting for the htaccess

I try but I just do not understand this, nothing happen when I did this, all I want to do is make my PHP search engine friendly

Options +FollowSymlinks
RewriteEngine on
RewriteRule ^(.*)/menu /food/

[php]RewriteEngine On
RewriteRule ^([a-zA-Z0-9]+)$ select.php?id=$1
RewriteRule ^([a-zA-Z0-9]+)/$ select.php?id=$1[/php]

Notice to the two RewriteRules, it allows for a person to enter “/” or not. For for more information or help just Google clean url in php using .htaccess

TY

I try it but it did not work. I will chech to see if on my hosting site that the Rewrite mode is turn on

I did make one mistake id

http://domain name/menu /food/select.php?id=183

http://domain name/menu /food/select.php_id_=183

To be honest I have problems with clean URLs that is why I said to Google, for that is what I normally do. ::slight_smile: ;D

Sponsor our Newsletter | Privacy Policy | Terms of Service