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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T14:14:45+00:00 2026-06-16T14:14:45+00:00

It is possible to combine these two .htaccess files into one? They deal with

  • 0

It is possible to combine these two .htaccess files into one? They deal with two separate PHP apps that have completely separate pretty URL handling. The reason why I want to try one is because mod_security is throwing errors and completely ignoring my second .htaccess file in the chain here, but seems to not have a problem with one .htaccess file.

So, if one goes to /blah, the first app handles the pretty URL handling. But if one goes to /members/blah, the second app handles the pretty URL handling. However, note the -f and -d parameters where we check for actual file or directory paths and permit those through.

In the root:

RewriteEngine On
RewriteRule ^index\.php$ - [L]
RewriteRule ^members$ /members/ [QSA,L]
RewriteRule ^members/(.*)$ /memberapp/$1 [QSA,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

In /memberapp:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /memberapp/index.php [QSA]

EDIT 1:

So, here’s the mapping example:

domain.com = domain.com/index.php
domain.com/ = domain.com/index.php
domain.com/?test=test = domain.com/index.php
domain.com/members/test.png = domain.com/memberapp/test.png (file exists)
domain.com/members/dir1 = domain.com/memberapp/dir1 (directory exists)
domain.com/members/dir1/ = domain.com/memberapp/dir1 (ditto)
domain.com/test = domain.com/index.php
domain.com/members/login = domain.com/memberapp/index.php
domain.com/members/test.php = domain.com/memberapp/test.php (file exists)
domain.com/dir1 = domain.com/dir1 (directory exists)
domain.com/dir1/ = domain.com/dir1 (directory exists)
domain.com/test.png = domain.com/test.png (file exists)
domain.com/members/login?test=test = domain.com/memberapp/index.php
  • 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-16T14:14:46+00:00Added an answer on June 16, 2026 at 2:14 pm
    RewriteEngine On
    
    RewriteRule ^index\.php$ - [L]
    RewriteRule ^members$ /members/ [R=302,L]
    RewriteRule ^members/(.*)$ /memberapp/$1 [QSA,L]
    
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^membersapp/ /memberapp/index.php [L]
    
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is it possible to combine two wav files into one as if they've been
Is it possible to combine these two queries into one query? SELECT sum(amount) as
Is it possible to combine Underscore's filter and map? I currently have two separate
Is it possible to combine these two queries to form one? First Query: SELECT
Possible Duplicate: How to combine these two SQL statements? I have 2 SQL queries.
Is it at all possible to combine two different query results into one feed
I have three separate queries that I'd like to combine into a single query
I have to files that I need to combine together using Apache PIG. First
I have two LINQ expressions that I think I should be able to combine
I am trying to combine these two tables then order it by one column

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.