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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T00:47:24+00:00 2026-06-17T00:47:24+00:00

I can’t find anyone asking or the answer to my specific scenario. I am

  • 0

I can’t find anyone asking or the answer to my specific scenario.

I am moving an old e-Commerce site with a ton of static product and info pages to a new e-Commerce software package installed in a new location (into a new folder in the root).
http://domain.com into http://domain.com/newstore

I know I can redirect the whole site to the new location but that won’t work since much of the new site runs dynamically from the eCommerce software and the product page addresses aren’t even close to the old ones.

I have created individual rewrites using RedirectMatch for all the product pages I know need to be redirected so that is good. Now I need any pages I may have missed to redirect to the new store’s home page but I obviously can’t redirect what I don’t know. So there’s my issue, how do I now get any left over pages redirected to the home page without ruining the 200 some RedirectMatch rules I have in place?

  • 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-17T00:47:26+00:00Added an answer on June 17, 2026 at 12:47 am

    Note that RedirectMatch is mod_alias, not mod_rewrite. The two modules don’t always play nicely with each other when directives from both get applied to the same URI. Without any idea how your site is setup, there’s no way to answer your question, but you can try something like this using *mod_rewrite*:

    RewriteEngine On
    # Check that the request isn't for an existing resource
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    # Check that the request isn't for the new store
    RewriteCond %{REQUEST_URI} !^/newstore
    # redirect to the new store
    RewriteRule ^ /newstore/ [L,R]
    

    The reasoning here is that if a request isn’t for an existing page, image, script, something that would possibly result in a 404, and if the request isn’t for the dynamic site that is in the /newstore folder, then we redirect it to the /newstore/ folder.

    But like I said, you’ve got 200 something RedirectMatch directives and mod_alias doesn’t always play nice with mod_rewrite. You may need to translate them all into rewrite rules, but it’s probably not necessary. Example:

    RedirectMatch 301 ^/old-path/old-page.html$ /newstore/?page=123
    

    would translate to:

    RewriteRule ^/old-path/old-page.html$ /newstore/?page=123 [L,QSA,R=301]
    

    All of these rewrite rules **must be before the rule above that redirects all 404’s to /newstore*. Because it’s a “catch-all” rule that is like a last resort, it needs to be after all of your regular redirects.

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

Sidebar

Related Questions

Can anyone help me trying to find out why this doesn't work. The brushes
Can anyone let me know how can we change the value of kendo combobox
Can anyone enlighten me to a way I can Highlight the content of an
Can anyone explain to me why this program: for(float i = -1; i <
Can anyone know how to add Radio Buttons in a Datagrid View Column?? I
Can anyone show me how to loop through my table in my view? The
Can anyone tell me what i am doing wrong? I am trying to get
Can anyone direct me to a good tutorial on how to set up virtual
Can anyone tell me how an IDE like NetBeans or any for that matter
Can anyone give me some tips on adding a custom button for each row

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.