Solved

what does this rules in .htaccess means

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SharePoint 2013 Searchbox Branding 11 46
Select2 jquery help 9 75
Does it make sense migrate a website to MIcrosoft Azure 4 48
Cordova Camera plugin fails 2 98
If your site has a few sections that need to be secure when data is transmitted between the server and local computer, such as a /order/ section for ordering or /customer/ which contains customer data, etc it would of course be recommended to secure…
Developer portfolios can be a bit of an enigma—how do you present yourself to employers without burying them in lines of code?  A modern portfolio is more than just work samples, it’s also a statement of how you work.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.

863 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

22 Experts available now in Live!

Get 1:1 Help Now