Solved

what does this rules in .htaccess means

Posted on 2009-06-27
1
261 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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

Suggested Solutions

An enjoyable and seamless user experience can go a long way on an eCommerce site. While a cohesive layout and engaging copy play roles in creating a positive user experience, some sites neglect aspects that seem marginal but in actuality prove very …
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
The viewer will learn how to count occurrences of each item in an array.
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…

737 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