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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T05:39:56+00:00 2026-06-03T05:39:56+00:00

I am moving from an old php based site to a new one based

  • 0

I am moving from an old php based site to a new one based on wordpress. In the process we are getting rid of quite a few unnecessary pages.

However some of the pages are showing on google, and I want to avoid 403 or 404 errors by using 301 redirects to pages now containing the same info on the new site.

My current .htaccess shows:

# Switch rewrite engine off in case this was installed under HostPay.
RewriteEngine Off

SetEnv DEFAULT_PHP_VERSION 53

DirectoryIndex index.cgi index.php

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress

and I was wondering what the best way to do 301 redirects is? putting them before or after the code just gives a 404 error.

  • 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-03T05:39:58+00:00Added an answer on June 3, 2026 at 5:39 am

    Putting a rule similar to this before the index.php rewrite rules should work:

    RewriteRule ^(.*)$ http://newwebsite.com/$1 [R=301,L]
    

    You can put a bunch of RewriteCond’s before it to catch only those pages with issues.

    For the specific case you posted in the comments, this rule works:

    RewriteRule ^why-choose-us.* about-us [R=301,L]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm in the process of moving from an old laptop to a new one.
I am moving my site to new domain. Need to redirect pages from old-site.com/oldpage.php?id=X
I'm in the midst of moving a site from plain old php to the
I'm moving a site from one server to another. On the old server, my
When moving a file from old.package to new.package I want two things to happen:
I'm moving a site from one e-commerce software to another, and I've created URL
I'm in the process of moving users from an old Windows domain to a
A client is moving from their old hosting to mine. They have a few
I'm moving an application from one server to another and the new server returns
I am quite new to ASP.NET MVC and MVC in general. Moving from the

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.