Hi I would like to kide my extension in the url address bar like the following Before: www.mysite.com/search.php After: www.mysite.com/search/ What is the correct rule to add in .htaccess file? Thanks
Mod rewrite is what you want. Probably looking for a rule similar to this: RewriteRule ^(.+)$ /$1.php [L]
Lol you're making it too difficult RewriteRule ^search(/?)$ search.php [NC,L] Will take search and search/ and make it pass to search.php
np man. rewrite is pretty easy for the basics. You just need to know (.*) (match anything), ([0-9]+) (match a series of numbers) and (/?) that allows a slash but doesn't make it mandatory. Otherwise it creates $1, $2, $3, etc based on each one of those you put in the left side. Cake
NC = no case (so SEARCH/, search/, SeArCh/ etc all work) L = last, it will not read any more rules and it'll end at this one and perform the action.
My php files are in root\go\ sub directory. Example I want root\go\godaddy when typed in address bar works as root\go\godaddy.php for all php files in root\go\ sub directory what code should I add in .htaccess. I am using godaddy hosting