Jump to content

Recommended Posts

Posted

Hi I was wondering which is more advisable to use:

 

RewriteRule .* index.php

or

RewriteRule !\.(js|ico|gif|jpg|png|css)$ /index.php

 

I guess I am just trying to understand the difference between routing all requests to index.php vs routing all but a few select file types.

 

There some security difference here?

 

Thanks!

Posted

To me, it depends on what you want to achieve.

 

If you want to allow some files to be seen, then you would use the later. If you want to prevent access to any file other than the index file, you would use the former.

 

The former is potentially more secure ( assuming the index file is secure ), but only if other files / areas that someone could reach are insecure.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...