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

  • Home
  • SEARCH
  • 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 8539473
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T11:22:26+00:00 2026-06-11T11:22:26+00:00

I have an old site ( www.example.com ) with approximately 2000 documents (PDF, Word

  • 0

I have an old site (www.example.com) with approximately 2000 documents (PDF, Word doc, Excel). All the 2000 documents (PDF & Word doc) use these existing links to refer each other.

I have created another site (www.example.net), with a different document path. I want to map the old URLs to the new, so that I don’t lose the visits, and so that a user who has an old file with the old link will still get the documents from the new site.

Old document path: http://www.example.com/sites/docs/abc.pdf

New document path: http://www.example.net/files/resources/def.pdf

(Note that the domain name has changed, the path to the document has changed, and the document name itself has changed. There is no pattern to the change in document names.)

Common Solutions:

  1. .htaccess redirects, but there are 2000 docs, so it’s a lot of work

  2. normal redirects with hard coded URLs in a .php file, which will work the same as the .htaccess

Is there any better solution than these?

  • 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-11T11:22:27+00:00Added an answer on June 11, 2026 at 11:22 am

    If the documents are entirely unique, as in: abcd.pdf gets redirected to pqrs5000_foo.pdf (i.e., there is no correlation at all between the two), then there’s no way around explicitly redirecting all 2000 of them. It’s just a matter of whether you want to put them all in an htaccess/vhost/server config file or in another file and use a RewriteMap and the txt map type. You need to define the map in either the vhost or server config though, it won’t work in an htaccess file, but you can use the map itself in an htaccess file.

    If the filenames are the same, and only the pathnames are different, you don’t need 2000 redirects at all, simply:

    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^(www\.)?example\.com$ [NC]
    RewriteRule ^sites/docs/(.*)$ http://www.example.net/files/resources/$1 [L,R=301]
    

    Or alternatively using mod_alias:

    Redirect /sites/docs http://www.example.net/files/resources
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to do this: I have an old URL: http://www.mysite.com/dev-site/some-content-part-here That I want
So, I have at site where I want pages such as; www.example.com/shop/index.php (or any
I have an old site www.mysite.com/index.php and a new site www.mysite.com/cms/index.php How is the
I have 2 domains. For the question, I will call them www.old.com and www.new.com.
I have a site name www.goo.com and i used to save cookie without declaring
I moved my old site to my new url http://www.polestardistribution.com with no problem. Imported
I know how to make URL's rewrite, for example: www.example.com/index.php?id=1&cat=3 to www.example.com/1/3/ (or whatever).
I have looked but can't find anything that works. I have an old site
My partner and I have a webcam site that basically runs the old-school method....Every
We have updated our site recently; the old one had around 300 pages... 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.