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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T13:55:34+00:00 2026-05-23T13:55:34+00:00

I have a site running on WordPress. I am testing out a new site

  • 0

I have a site running on WordPress. I am testing out a new site on our server under a subdirectory (sandbox/). For the new site I’m using an .htaccess rewrite rule similar to WP that rewrites to clean urls. I’m finding that pages that have an equivalent path in WP redirect to the WP page.

For instance, I have one page that has an url of /sandbox/supplies/information which redirects correctly to the new site. However, I have another page that is at /sandbox/events/ that will redirect to the base director at /events/.

After looking around at people’s similar problems, I’ve tried using RewriteCond %{REQUEST_URI} !sandbox/ [NC] and other variants (!^sandbox/.$ and the like), but it doesn’t seem to have any effect whatsoever. I’ve copied the two .htaccess files below.

Thanks in advance for your time. I hope I explained the situation well enough.

Base .htaccess

# BEGIN WordPress
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /

    RewriteCond %{REQUEST_URI} !sandbox/ [NC]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
</IfModule>
# END WordPress

Sub-directory (sandbox/) .htaccess

Options +FollowSymLinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /sandbox/index.php [L]
  • 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-23T13:55:35+00:00Added an answer on May 23, 2026 at 1:55 pm

    Well .. I have only used this line in main .htaccess file, and it all worked fine on my simulated setup:

    RewriteCond %{REQUEST_URI} !^/sandbox/ [NC]
    

    May I suggest changing Options +FollowSymLinks to Options +FollowSymLinks -MultiViews (or maybe you have tried that already)?

    If URL has /sandbox/ part and your /sandbox/.htaccess does not have RewriteOption inherit line, then rules from parent .htaccess are NOT getting used at all.


    How much control do you have over Apache? Can you edit config files (httpd.conf or httpd-vhost.conf)? If you can — enable rewrite debugging (RewriteLogLevel 9) and try that problematic URL — you should see exactly what is going on (maybe it getting redirected from within php application?). Other than that your rules are absolutely fine for me.


    Don’t know if this is good idea or not .. but in case you will be unable to figure out the reason for such behaviour, consider joining these 2 .htaccess files into 1 (changes are minimal).

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

Sidebar

Related Questions

I have a WordPress site running on a production server that I recently copied
We have a legacy ASP.net powered site running on a IIS server, the site
I have an existing site in php running on Apache using the mod_rewrite plug-in.
I have developed a site on linux server(my testing host server). But When I
Good Day! I have a photostudio site running on a Wordpress. It's have a
I have to upgrade a running wordpress site's wordpress CMS and some installed plugins.and
I have a Wordpress blog running on my site and I have no time
I have a site running on windows server 2008. The site is HTML, and
I have an EC2 instance running a WordPress site. The WordPress db is on
I have a wordpress based php application running on apache on ubuntu server. I

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.