Solved

what does this rules in .htaccess means

Posted on 2009-06-27
1
266 Views
Last Modified: 2012-05-07
hi
my manager wants me to tell him what this rules means

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ main.php [QSA,L]
can you please tell me because I'm newbie
please help as soon as possible
best regards
hatem gamal
0
Comment
Question by:hatem_from_mesr
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 3

Accepted Solution

by:
qualipsoft earned 500 total points
ID: 24727708
Turn on the rewrite engine
    RewriteEngine on

If the file requested is NOT a regular file...
    RewriteCond %{REQUEST_FILENAME} !-f

... then rewrite the URI (part relative to directory where the .htaccess is located or specified in last RewriteBase command) with main.php. QSA keeps any query string part and appends new ones and L specifies this is the last rewrite rule. For example http://host/current/dir/subdir/notafile?lang=en -> http://host/current/dir/main.php?lang=en.
    RewriteRule ^(.*)$ main.php [QSA,L]
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There’s a good reason for why it’s called a homepage – it closely resembles that of a physical house and the only real difference is that it’s online. Your website’s homepage is where people come to visit you. It’s the family room of your website wh…
When it comes to security, close monitoring is a must. According to WhiteHat Security annual report, a substantial number of all web applications are vulnerable always. Monitis offers a new product - fully-featured Website security monitoring and pr…
Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question