I have URLs that need have the old URL for download files.

Before, it has 2 separate website. The MAIN and the PORTAL website.


I want both websites under in one admin page. So I did and make "PORTAL" as CATEGORY and it works well.

The problem is, I have "404 Not Found" page whenever I tried to view the PDF files. The files are now in:




Since I made PORTAL as category, I deleted the "PORTAL" folder.

How can I make the URL path or what to change in the admin page or in .htaccess file to still have the OLD url? I cannot change the URL to the new one since most of the files are link to other websites.


Option 1

This is the clean way using .htaccess. Put this at the top of your .htaccess:

<IfModule mod_alias.c>
    RedirectMatch 301 /portal/wp-content/uploads/(.*) /wp-content/uploads/$1

Option 2

This is a bit brute-force and I therefore wouldn't recommend it, but I include it here for completeness.

Just copy all files in website/portal/wp-content/uploads to website/wp-content/uploads/ manually

  • Thanks kraftner, Option 1 works like a charm. Same URL in other website. Thank you again. – MightyGas Jul 30 '14 at 16:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.