Detect mod_rewrite

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Daz
Forum Newbie
Posts: 18
Joined: Thu Mar 19, 2009 2:12 am

Detect mod_rewrite

Post by Daz »

Is there a way to check if mod_rewrite is installed and/or enabled?
Mark Baker
Forum Regular
Posts: 710
Joined: Thu Oct 30, 2008 6:24 pm

Re: Detect mod_rewrite

Post by Mark Baker »

User avatar
Darhazer
DevNet Resident
Posts: 1011
Joined: Thu May 14, 2009 3:00 pm
Location: HellCity, Bulgaria

Re: Detect mod_rewrite

Post by Darhazer »

Daz wrote:Is there a way to check if mod_rewrite is installed and/or enabled?
And when you are creating a .htaccess file with mod_rewrite directives, use:

Code: Select all

<IfModule mod_rewrite.c>
RewriteEngine On
# your rewrite rules
</IfModule>
So you do not run in HTTP 500 problems ;)
Post Reply