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

  • Home
  • SEARCH
  • 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 4085620
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T18:36:19+00:00 2026-05-20T18:36:19+00:00

#+FollowSymLinks must be enabled for any rules to work, this is a security #requirement

  • 0
#+FollowSymLinks must be enabled for any rules to work, this is a security 
#requirement of the rewrite engine. Normally it's enabled in the root and you 
#shouldn't have to add it, but it doesn't hurt to do so.
Options +FollowSymlinks
#Apache scans all incoming URL requests, checks for matches in our .htaccess file 
#and rewrites those matching URLs to whatever we specify.
#to enable runtime rewriting engine
RewriteEngine On

#this tells mod_rewrite to leave the URL unchanged (the dash part -) and quit 
#other rewwrite processing rules if the requested segment has one of those 
#prefixes (that's what we asking when we use the ^ sign), on the list. If the 
#prefix is in the list, all subsequent Rewrite Rules are skipped.
#So to avoid some files OR directories to be redirected we use:
RewriteRule ^(somefile|somedir|someotherfile) – [L]

1) Don’t we need a condition here before these previous RewriteRule ?

#this will allow direct linkage to this extensions, regardless the case sensitive.
RewriteCond %{REQUEST_FILENAME} !\.(js|ico|zip|rar|mov|mpeg4|mp4|gif|jpg|png|css|doc|pdf|docx|wmv|mpeg|avi|mpg|flv|ppt|pptx|txt)$ - [NC]

2) Will the [NC] flag deal with all case variations here?

#if the request uri has not public...
RewriteCond %{REQUEST_URI} !^/public/.*$
#rewrite to public something...
RewriteRule ^(.*)$ /public/$1

3) Why do we have $1 and not /public/index.php on our RewriteRule?

#rewrite all requests that start with public, to public/index.php and if that's 
#the case, don't run any other rule.
RewriteRule ^public/.*$ /public/index.php [NC,L]

4) since this is the last rule, can we remove the L flag ?

  • 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-05-20T18:36:20+00:00Added an answer on May 20, 2026 at 6:36 pm
    1. No, anything that starts with somefile, somedir or someotherfile will not be rewritten (-). [L] ensures that further rules (including this one) will not be processed.
    2. Yes.
    3. Because the RewriteCond can match /public/otherthing as well, not just /public/index.php.
    4. No, without [L], an infinite loop will occur because the rewritten URL /public/index.php matches `^public.*$.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this in my htaccess: Options +FollowSymLinks Options -Indexes RewriteEngine On RewriteRule ^annons/([a-zA-Z0-9_]+)$
mod_perl/apache doesn't seem able to follow symlinks. In httpd.conf I have: Options FollowSymLinks <VirtualHost
How do i set up a subdomain w/o a TLD? i have this set
I have the following mod_rewrite: Options +FollowSymLinks RewriteEngine On RewriteRule ^register index.php?page=register The url
my .htaccess in the root folder includes the following lines : Options +FollowSymlinks RewriteEngine
I must be missing something obvious, but I can't make it work I want
I have an .htaccess file with the following contents: Options +FollowSymLinks +ExecCGI <IfModule mod_rewrite.c>
I have the following setup for phpmyadmin: <Directory /usr/share/phpmyadmin> Options FollowSymLinks DirectoryIndex index.php Order
I'm having problems with the follow code: Options FollowSymLinks RewriteEngine on RewriteRule ^thing/([^/]+)/?$ index.php?t=$1
How do I get this piece to follow symlinks in python 2.6? def load_recursive(self,

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.