Monday, May 24, 2010

What is the php code to hide the file extensions in the url?

How can the file name, the file extension and the query string of the url shown in the address bar of the browser be hidden? It must be shown as in yahoo and gmail. The scripting language used is php. Is there any predefined functions for hiding the filenames and the query string of the url in php? A sample code implementing this in php is needed. How can the changes be done in the .htaccess file? An example with a simple demo will do.

What is the php code to hide the file extensions in the url?
This is done through apache.





The query can be hidden by doing POSTs instead of GETs.
Reply:You can work with POST's as stated in the previous answer or you can work with sessions or url encoding or .htaccess (mod_rewrite)


No comments:

Post a Comment