using IfModule in .htaccess?

by 1 replies
4
I have recently downloaded and installed a fresh script right from the authors official website which is similar to a website that I bought a while ago.
A quick comparison of the .htaccess file between the two versions I found the differences like this

#############

## part of the original .htacess has
<IfModule mod_rewrite.c>
RewriteEngine On

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [L]

RewriteRule ^admin /admin.php [L]
RewriteRule ^(.*)$ /index.php/$1 [L]
</IfModule>

#############

## However the website I bought has something like this
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php/$1 [L]
</IfModule>

#############

obviously the two versions are different; something that makes me worry!. I am not good with these stuff so I need your help if you could comment on this whether something is wrong.

Thank you
#programming #htaccess #ifmodule
  • Nothing to worry about - they both do pretty much the same thing but in a slightly different way. The exception is the first block, second section, which rewrites requests for admin.php to index.php.

Next Topics on Trending Feed

  • 4

    I have recently downloaded and installed a fresh script right from the authors official website which is similar to a website that I bought a while ago. A quick comparison of the .htaccess file between the two versions I found the differences like this