.htaccess <IfModule mod_rewrite.c>

Started on the old forum in June 2011 · view the original in the archive · old links redirect here

#htaccess #modrewrite

1 reply · 15,836 views · started 15 years ago · 1 min read

2 participants
arpan.rnc Developer · 94 posts #1

can anyone tell me what does this .htacces code block do ?

<IfModule mod_rewrite.c>

RewriteEngine On

RewriteBase /

RewriteRule ^index\.php$ - [L]

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule . /index.php [L]

</IfModule>
neostar Developer · 109 posts #2

arpan.rnc wrote: can anyone tell me what does this .htacces code block do ?

<IfModule mod_rewrite.c>

RewriteEngine On

RewriteBase /

RewriteRule ^index\.php$ - [L]

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule . /index.php [L]

</IfModule>

it will redirect all get request to index.php if the requested file of dir does not exists.

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close