How To Enable .htaccess Or Rewrite Mode On Apache

Hi Friends, In this article I am going to explain you how can we enable .htaccess  or rewrite mode on Apache server. So to enable .htaccess or mode rewrite on apache server we will need access to httpd.conf file by which we can enable .htacess /mod rewrite. .htaccess files allows us to change configurations on our servers per directory or subdirectory, So to enable .htaccess file or mod_rewrite we have to edit httpd.conf file and remove comment from mod_rewrite line, So you have to change this line from :

;LoadModule rewrite_module modules/mod_rewrite.so

to (to remove comment remove semi column from left side)

LoadModule rewrite_module modules/mod_rewrite.so

Also we need to change the AllowOverride directive also from

<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Satisfy all
</Directory>

to

<Directory />
Options FollowSymLinks
AllowOverride All
Order deny,allow
Deny from all
Satisfy all
</Directory>

So now you know how can we enable .htaccess or mod_rewrite on apache server.

I hope this post helpful for someone. If you have any question then you can ask me anytime or post it in comment.

Also I am PHP Freelancer, Freelance PHP Developer having more than 4 years of experience, So if you want to do any projects then you can contact me.

Hostgator Hosting in 1 Cent Coupon Code – “1CENTHECOUPON” (Without Quotes).

Subscribe to PHP Freelancer

Enter your email address: