Solved

what does this rules in .htaccess means

Posted on 2009-06-27
1
218 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
1 Comment
 
LVL 3

Accepted Solution

by:
qualipsoft earned 500 total points
Comment Utility
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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

If you've heard about htaccess and it sounds like it does what you want, but you're not sure how it works... well, you're in the right place. Read on. Some Basics #1. It's a file and its filename is .htaccess (yes, with a dot in the front). #…
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

763 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now