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 6470735
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T06:08:40+00:00 2026-05-25T06:08:40+00:00

my htaccess file is that: RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME}

  • 0

my htaccess file is that:

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI}  .*
RewriteCond %{QUERY_STRING} .* [NC]
RewriteRule .*\.php cms/index.php?request=$0&%{QUERY_STRING} [L]
RewriteRule ^(?:(?!website).).*\.(?:(?!php).)+$ cms/website/$0 [L]
RewriteRule ^[^./]*(\/[^./]*)*$ cms/index.php?dirs=$0 [L]

for example there is a file in uploads/aa.png, and if I request http://example.com/uploads/aa.png, it still redirect http://example.com/website/uploads/aa.png.

shortly, if there is file at the url requested it still redirect “cms/website”, how can I disable that?

  • 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-25T06:08:41+00:00Added an answer on May 25, 2026 at 6:08 am

    The RewriteCond directive only applies to the next RewriteRule. (Only one.)

    So your rewrite conditions apply only to your first RewriteRule. The other rewrite rules are unconditional.

    You have to repeat the RewriteCond’s for each RewriteRule, or set an environment variable:

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule .? - [E=FILE_EXISTS:1]
    
    RewriteCond %{ENV:FILE_EXISTS] !=1
    RewriteRule .*\.php cms/index.php?request=$0&%{QUERY_STRING} [L]
    
    RewriteCond %{ENV:FILE_EXISTS] !=1
    RewriteRule ^(?:(?!website).).*\.(?:(?!php).)+$ cms/website/$0 [L]
    
    RewriteCond %{ENV:FILE_EXISTS] !=1
    RewriteRule ^[^./]*(\/[^./]*)*$ cms/index.php?dirs=$0 [L]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following .htaccess file: RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} ^mydomain.com RewriteRule
Ok, so I have this .htaccess file that contains this <IfModule mod_rewrite.c> RewriteEngine On
I want something to put in my .htaccess file that will hide the .php
I have a .htaccess that sends these urls: http://example.com/this/is/test/ to index.php that gets the
My htaccess right now: # Use PHP 5.3 AddType application/x-httpd-php53 .php RewriteEngine On RewriteBase
I currently have a .htaccess file that rewrites dyhamb.com/episode.php?episode=1 as dyhamb.com/1 . I would
I am using this htaccess file. Everything is working fine except that first RewriteRule.
I'm writing an .htaccess file that will check if a requested page exists in
i am trying to create an .htaccess file that will achieve the following create
I'm trying to write a rule for my .htaccess file that checks for a

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.