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
</IfModule>
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
Related Posts:
- Including category-base in a post permalink results in 404
- WordPress thinks my custom route is a 404
- How to map permalinks with accented letters to sanitized slugs?
- Remove subfolders from URL
- custom naming of search permalink /search/
- Auto 301 to full post permalink? (using /posts/%post_id%/%postname%)
- removed index.php now all pages 404
- Using WP rather than .htaccess to redirect pages/posts
- After moving from subdirectory to home, home page does not display
- Rewrite my default post URL
- Problems redirecting to “pretty” permalinks (wordpress in Subdirectory)
- Why does chrome keep downloading a file instead of running the site?
- Permalinks: Page Not Found
- AWS WordPress Install – pages/posts 404 on restart until updating permalinks
- WordPress 404 in development area
- Custom Permalink
- How to redirect to correct pages after permalink structure change
- Page preview is shown, updating page gives 404 error
- Redirect a Blogger Page URL to wordpress
- URL rewriting: removing the site’s basename for a specific category
- Unable to get /%postname%/ permalinks working, 404 on all links
- Permalinks 404 error with HTTPS host
- Accessing Subdirectories in WordPress Install
- How to rewrite a URL to another rewritten URL without changing the address?
- mod-rewrite exception? keep #hash in matching urls?
- Visiting posts results in 404 errors after host migration
- 404 permalink errors on Pages only
- WordPress pages and posts are redirecting to server IP address instead of domain URL [closed]
- Custom permalink structure with %postname% in front of domain name
- Problems with permalinks (.htaccess not working)
- old permalinks not found
- WP-e-commerce (getshopped) – Annoying permalink issue [closed]
- MySQL-inserted custom taxonomy term lead to 404, flush rewrites doesn’t help
- No Ones Been Able to Override my WordPress Rewrite Rule Issue!
- My permalinks for all pages and posts now include old page titles as parents/categories
- How to rewrite a folder in WordPress?
- LetsEncrypt WordPress on the Raspberry Pi – Nice url’s give 404 with https, http works
- When using number in url it is redircting to same page but when using character it redirects to 404
- Once redirected by Rewrite rules, how can WordPress know the page?
- Although rewrite engine is on, I get 404 not found on every page
- Passing and retrieving query vars in wordpress
- How to remove dates from existing permalinks?
- Setting up WordPress with Custom Permalinks and no .htaccess File?
- Getting the Site URL Including the Front Base
- How to prevent the default home rewrite to a static page
- URL Rewrite + Page + Custom Post Type = Unusual Redirect
- WordPress on a subdirectory of Laravel – WordPress pretty permalinks inner page shows laravel
- Rewrite user profile URL to be human friendly
- removing index.php IIS 7.5 webconfig
- rewrite_rule for custom post type doesn’t affect get_permalink
- Add ‘articles’ prefix before blog posts url without affecting pagination
- Permalinks broken regularly
- 404 Page Not Found for Only One Post
- WordPress not respecting template hierarchy (fetches index.php instead of single.php or page.php)
- Call to a member function add_rule() on a non-object
- How can I add a page’s ID to its permalink using WP_Rewrite?
- Permalink change made author archive vanished
- Re-write specific custom post type category URL to go to another page
- Change blog segment of URL
- Change in permalink structure made javascript cookie not work correctly
- Nginx Rewrite Rule:: index.html added to every permalink
- Share same Slug for a Custom Post Type and 2 Taxonomies
- Using taxonomy term in CPT permalink – Pages 404’s
- Edit page slug after save, cause 404 by linked pages
- IIS 7 Rewrite with parent categories
- Passing the JQuery string to Worldpress URL
- An other permalink problem – 404 Error
- How to prevent WP overwriting my custom htaccess rewrites?
- Format HTTP links
- .htaccess rewriterule being ignored – tyring to remove dates from WP posts
- Change directory url to be same as page permalink?
- How to redirect RSS feeds to Feedburner and keep pretty permalinks?
- 404 redirect based on url
- Permalinks – .htaccess
- Configuring Home Page Address
- WordPress Permalinks 404 bug with “next” button
- permalink and add_rewrite_rule – error 404
- IIS7.5 URL rewrite pboblem on index page
- Create different permalinks for same post
- WordPress /page/2 gives 404 when custom permalinks is set to %category%%postname%
- WP permalink working, but why content doesn’t display
- Giving specific category posts its own permalink structure returns 404
- Flushing rewrite rules enables to see an article, but I didnt change anything
- Redirect page to homepage, keeping URL
- 404 page not found – Yet open admin page it works
- How can I put WordPress in a directory but keep just the home page at the domain root?
- Updates all internal links on permalink update
- how to have same rewrite rules for 2 different post type?
- Problem with permalinks
- What permastrusture tags are generated out of the box right after creating custom post types and taxonomies?
- Issue with my links or permalinks
- .htaccess not working in WordPress
- How to change pagination base from slash to query form?
- redirect old pages by .htaccess
- WordPress 3.1 problem, getting 404
- htaccess strip url
- Add additional URL variations for a Post
- How to use ‘blogs.dir’ as media upload instead of ‘uploads’ directory in WordPress multisite setup
- Post pages are redirecting to the 404 page in wordpress
- How to make my custom permalink pull up the correct post