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
- Need help with add_rewrite_rule
- After server migration only the homepage works
- remove “index.php” from permalinks
- Changing permalinks gives me 404 errors on nginx
- How do I add /blog/ as a prefix to permalink structure for blog posts, tag pages, etc.?
- Passing and retrieving query vars in wordpress
- Permalink format: singular or plural
- How does WordPress handle permalinks?
- Pretty permalinks for search results with extra query var
- How to get pretty URLs with add_query_arg in permalinks
- Creating custom permalink structure for languages
- Custom post type permalink endpoint
- 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
- Does WordPress Change the .htaccess File When Updating?
- Using $_GET variables in the URL?
- Setting 404 page in Nginx
- Move WordPress to subdirectory, keep ALL URLs
- Date based URLs for custom posts and pagination
- How to add a custom URL placeholder to author archives?
- 301 Redirects for Changed Permalink Structure & Category Base
- How to custom change author base without $this->front?
- Permalinks to Custom does not work (out of box)
- URL rewrite based on a custom field value
- Update URL Snippet to Canonical Permalink URL
- WordPress permalinks Yahoo hosting(no .htaccess allowed)
- How to prevent the default home rewrite to a static page
- How do I turn off 301 redirecting posts (not canonical)?
- “.#[random-char-string]” being inserted at end of URLs
- Permalink Issues by Installing WordPress in Subdirectory / Subfolder
- Passing variables through permalink structure
- How to change author base without front
- permastruct for custom post type not working in one of four cases
- URL Rewrite + Page + Custom Post Type = Unusual Redirect
- WordPress on a subdirectory of Laravel – WordPress pretty permalinks inner page shows laravel
- Pretty Permalinks
- Make post slug have priority over category slug
- Remove parent slug for child pages
- How to create a permalink structure for posts in a specific category
- How to remove the index.php in the url?
- Homepage loads but all permalinks are 404 when using nginx & PHP-FPM
- Remove parent slug for child pages
- Changing Permalinks to a Custom Permalink causes a 404 Error [no matter what I do]
- Multisite wordpress and subdomain URL collisions
- Add custom directory in URL
- Using two permalinks for one post
- 404 on category.php pagination
- flexible rewrite ‘ramble’ URLs with WordPress
- How can I Rewrite a ‘page’ URL based on query string parameters?
- Custom rewrite rules for a $_GET request
- Nice RSS Feed URLs for each custom post type
- htaccess or redirect to cloak portion of a link?
- WordPress overrides the GET variables, (page_id) set in HTACCESS
- Change the custom post type permalink
- Custom rewrite rules for feeds of custom queries (query_var query strings in URL)?
- Changing URL from /%postname%/%post_id to /%category%/%postname%/%post_id%
- Using only %postname%
- Posts not working on windows after changing permalinks
- Put post ID on the custom post type URL