Hi,
I am a new in PHP. Can any one tell me that how to use url rewrite.
Hi,
I am a new in PHP. Can any one tell me that how to use url rewrite.
There are plenty of tutorials if you search google
URL Rewrite tutorial
Here is a good one:
http://www.yourhtmlsource.com/sitemanagement/urlrewriting.html
I create the .htaccess file and place in a root folder actually I want to all my php files to display in a html files like
http://localhost/practice/Todayera/index.html
The code I am using in the .htaccess file is
RewriteEngine On
RewriteRule (.*).html$ $1.php [L]
but its still display
http://localhost/practice/Todayera/index.php
Can you please help me
Over all The summary is that if someone go to on
http://localhost/practice/Todayera/index.php
but I want to show in address bar is like
http://localhost/practice/Todayera/hello
and I dont know what code I need to write in .htacess file.
Firstly, .htaccess files only work on Apache, so if you're using IIS, you need to look for an equivalent for that web server.
If you are using Apache, have you made sure that a) the mod_rewrite module is installed, and b) it's actually included in the httpd.conf file.
If you find you do have to edit a config file or install the module, you will need to restart your web server (not the whole server, just Apache)
Lastly, if you're unsure whether or not the module is installed, create a php script with just phpinfo(); in, which should show you the entire setup of your server, including all installed modules.