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

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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T16:51:41+00:00 2026-06-01T16:51:41+00:00

Options -Indexes RewriteEngine on Options +FollowSymLinks RewriteRule ^$ 2012/index.php [L] RewriteCond %{DOCUMENT_ROOT}/2012%{REQUEST_URI} -f RewriteRule

  • 0
Options -Indexes
RewriteEngine on
Options +FollowSymLinks

RewriteRule ^$ 2012/index.php   [L]
RewriteCond %{DOCUMENT_ROOT}/2012%{REQUEST_URI} -f
RewriteRule .* 2012/$0 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* 2012/index.php$0 [QSA] #<-- this is wrong here, and gives 500 error

I am trying to server all my urls from the 2012 subfolder.

I tried the above script, and it fails for urls like:

index.php/admin/controller/action?id=123

which should be resolved from the subfolder
2012/index.php/admin/controller/action?id=123

what is wrong?

  • 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-06-01T16:51:42+00:00Added an answer on June 1, 2026 at 4:51 pm

    I’m going to guess that the URI /index.php/admin/controller/action?id=123 fails the -f test for %{DOCUMENT_ROOT}/2012%{REQUEST_URI}, and is instead getting rounded up by the last rule: RewriteRule .* 2012/index.php?q=$0 [QSA], turning the URI into /2012/index.php?q=index.php/admin/controller/action&id=123. You’ll have to add a special case for this because the first condition/rule allows the existing files to be rewritten as-is, and the last condition/rule acts as a “catch-all” (and the very first rule is simply for the special case when the request URI is /). Try something like this:

    RewriteRule ^$ 2012/index.php   [L]
    RewriteCond %{REQUEST_URI} ^/index\.php [OR]
    RewriteCond %{DOCUMENT_ROOT}/2012%{REQUEST_URI} -f
    RewriteRule .* 2012/$0 [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule .* 2012/index.php?q=$0 [QSA]
    

    The new condition RewriteCond %{REQUEST_URI} ^/index\.php [OR] will be satisfied if a request is made starting with /index.php and the URI gets rewritten as-is into the /2012/ directory. The [OR] ensures the previous condition of a direct access be honored.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Options +FollowSymLinks -MultiViews -Indexes RewriteEngine on RewriteBase / RewriteCond %{REQUEST_FILENAME}\.php -f RewriteCond %{REQUEST_FILENAME} !-d
Options +FollowSymlinks RewriteEngine On RewriteCond %{HTTP_HOST} ^http://agilerent.com$ [NC] RewriteRule ^(.*)$ http://www.agilerent.com/$1 [R=301,L] this is
I have this in my htaccess: Options +FollowSymLinks Options -Indexes RewriteEngine On RewriteRule ^annons/([a-zA-Z0-9_]+)$
Options -Indexes <IfModule mod_rewrite.c> RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$
I have this htaccess script Options -Indexes Options +FollowSymlinks RewriteEngine on RewriteBase / RewriteCond
My htaccess have this code # # Apache/PHP settings: # Options -Indexes Options +FollowSymLinks
this is the url my application uses http://mydomain.com/index.php http://mydomain.com/video.php?id=29 http://mydomain.com/news.php?id=33 http://mydomain.com/photos.php?albumid=10 http://mydomain.com/archive.php http://mydomain.com/album.php http://mydomain.com/contact.php
I have the following: # Enable Redirects RewriteEngine On RewriteBase / Options +FollowSymlinks Options
So I have the following .htaccess in my /var/www/site RewriteEngine on RewriteRule ^([^/]+)/?$ parser.php?id=$1
Here's the mod_rewrite portion of my .htaccess Options +FollowSymlinks Options -Indexes # Prevent Direct

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.