URL Rewriting apache mod_rewrite

by Nathan 24. February 2010 07:54

 

You have to make sure  you have AllowOverride in your httpd.conf for mod_rewrite to work.

To make the rewrite active for a website you have to change the .htaccess file

An example of the content would be:

Options +Indexes
Options +FollowSymlinks
RewriteEngine on
#RewriteBase /
RewriteRule ^(.*)\.html$ $1.php [L] 

This script converts all requests to a .html file to a .php file. So it appears as a HTML file to the end user.

Tags: , ,

PHP

Add comment


(Will show your Gravatar icon)

  Country flag

biuquote
  • Comment
  • Preview
Loading



Powered by BlogEngine.NET 1.6.1.0
Theme by Mads Kristensen