Setting up Apache URL Rewriting Engine
I promise this will be quick and straight. This guide works in both linux and windows apache web server.
Are you ready? alright, lets get the ball rolling.
First locate your apache config file which is named httpd.conf and open it. Then, look for this line
LoadModule rewrite_module modules/mod_rewrite.so
Uncomment it (remove the # before the LoadModule).
Next set your httpd.conf file to allow overrides from the .htaccess file. Change
AllowOverride controls what directives may be placed in .htaccess files.
It can be "All", "None", or any combination of the keywords:
Options FileInfo AuthConfig Limit
AllowOverride None
To
AllowOverride controls what directives may be placed in .htaccess files.
It can be "All", "None", or any combination of the keywords:
Options FileInfo AuthConfig Limit
AllowOverride All
Then, save your httpd.conf changes and restart your apache server.
That’s all about it. you can now start doing url rewriting.
Heres a sample entry of url rewriting using the .htaccess
RewriteEngine On
RewriteRule ^index.html$ index.php [NC,L]
It means, when someone access the index.html it forwards to the index.php.
We’ll discuss more about URL rewriting on my next post.
If you have questions please feel free to send them using the comment box.
If you are looking for an outsourcing company to remotely manage your pool of servers then i highly recommend StickyMedia Solutions Inc. - an IT Outsourcing company in the philippines.
Spread the word
del.icio.us Digg Furl Google StumbleUpon Technorati Windows Live Yahoo! Help












1 Comment on Setting up Apache URL Rewriting Engine »
AJay Bairagi @ 7:06 am:
sir,
i use apache 2.2.17
PHP - 5.2.12
Mysql - 5.2.12
and i also on
LoadModule rewrite_module modules/mod_rewrite.so
and set RewriteEngine On
but not working sef url
error -
Oops! This link appears to be broken.
Thanks