Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7850163
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T18:46:15+00:00 2026-06-02T18:46:15+00:00

mit .htaccess looks like this. RewriteEngine on RewriteRule !\.(js|gif|css|jpg|png|ico|txt|html)$ index.php [L] It allow normal

  • 0

mit .htaccess looks like this.

RewriteEngine on
RewriteRule !\.(js|gif|css|jpg|png|ico|txt|html)$ index.php [L]

It allow normal access to the URLs with the listed file extensions. All other requests are sent to the index.php.

How can I simplify my .htaccess so it allows all file requests and redicts only requests without file extension to the index.php?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T18:46:17+00:00Added an answer on June 2, 2026 at 6:46 pm

    I would do it like this:

    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    

    I assume that your .htaccess is located in your documentroot. Otherwise try:

    RewriteEngine On
    RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-f
    RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    

    Both examples would send all traffic to index.php except those to physically existing files.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

html: <img src=http://webmuseum.mit.edu/mobiusicons/no_image.jpg /> css: div.border { border: 2px solid #ccc; width: 500px; height:
This is the book... http://mitpress.mit.edu/sicp/full-text/book/book.html Any idea which interpreter I should use to work
SICP Chapter 3.5.3 http://mitpress.mit.edu/sicp/full-text/book/book-Z-H-24.html#%_sec_3.5.3 In section Streams as signals , SICP gives an audio-visual
I stumbled across the WB on-disk B-tree library: http://people.csail.mit.edu/jaffer/WB It seems like it could
I am new to scheme. This is code sample from SICP course of MIT.
Anyone know of a more permissive license (MIT / public domain) version of this:
I am watching Intro to Algorithms (MIT) lecture 1. Theres something like below (analysis
This page summarizes different license types' terms (GPL, LGPL, MIT, BSD, etc): http://www.codeproject.com/info/Licenses.aspx Say
I just copied this code from the MIT video lecture that is posted online:
I am writing an imaging library (using the MIT licence) and would like to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.