Are these pdfs all in a sub-directory somewhere? You could add an .htaccess file to your sub-directory root then put this as the top line.
ErrorDocument 404 /path/to/your404page
This would make it easier to manage and keep it separate from your main htaccess file.
Related Posts:
- How to prevent automatic redirection of 404 errors and “incorrect” URLs?
- Disable WordPress URL auto complete
- Redirect user to original url after login?
- Disable ONLY URL auto complete, not the whole canonical URL system
- User redirect to destination URL after login
- Creating 301 Redirects for Post, Page, Category and Image URLs?
- Redirecting WordPress /.htaccess / HSTS / SSL
- Why does WordPress automatically redirect URLs with the parameter “name=” to a different page?
- How to setup 301 redirects for multiple query string URLs?
- How can I move/redirect single blog posts from one blog to another?
- Stop unwanted WP redirection to new url
- Custom domain for sub-section of parent website
- How does WordPress redirect to WooCommerce shop page? [closed]
- WP redirects all pages from new domain to old domain
- Does WordPress automatically redirect url without parent slug?
- How to redirect visitor to a custom URL using PHP code in functions.php
- Redirect home to another page with htaccess
- Does WP always makes 301 redirection?
- Why does wp_redirect strip out %0A (url encoded new line character) and how do I make it stop?
- How to redirect URL with subfolder to the same URL but without subfolder?
- htaccess 301 Redirect not working for WordPress site
- How to redirect a page into file?
- How to redirect after login getting a variable from url (for example with the language)
- How to set 301 redirection after moving WordPress blog?
- How can I replace my primary url globally with a parked one?
- URL redirect problem
- Adding rewrite rule dynamically for search results redirecting to 404 URL
- Redirect custom post type from one domain to another domain
- How to redirect to clean links with this code
- Built-In Postname Redirection vs Hard Redirects in relation to SEO and performance
- reducing number of URL Redirects and increasing speed
- How to remove the [L] Flag for WordPress index .php mod_rewrite
- URL masking of subdomain to main domain using .htaccess
- Disable WordPress URL auto complete
- Redirect user to original url after login?
- Redirect non existing page to frontpage
- store URL global before we redirect
- WP_List_table with form of method=GET redirects to wrong url after submit
- Redirect old URL (with different post ID) to new URL
- How to fix automatic redirects?
- My redirect URL doesn’t show any pages on my website [closed]
- Preventing Canonical Redirect for CDN
- URL redirection
- Erase the HTML website and replace it with a WordPress website -301 Redirection
- 301 Redirect in WordPress not working in htaccess
- URL redirect regular expressions redirecting all after first viriable
- Disable WordPress URL auto Redirect
- How to get user details by name
- Redirect only PDFs in different folders?
- How to disable WordPress URL autocomplete / recognition?
- using wp_rewrite but keep the original url in the address bar
- I’ve move my site but URL still goes to the old site
- Resolving the too many redirects on wordpress
- redirects for removed/deleted woocommerce products
- Redirect based on $_GET parameters
- International characters in slugs to redirect to
- Rewrite rule for incoming urls
- URL Custom Rewrite
- Best SEO way to redirect from all “posts” to home url
- How to change Ugly link?
- Redirect ignore last URL segment
- php refresh current page?
- Host the wp-admin on another domain?
- WordPress localhost site redirect to live site
- WordPress HTTPS redirect loop
- Using `auth_redirect` : keeps asking me to login even when I’m logged in
- Moving variables from one page to another
- How to create a 301 redirect that doesn’t apply to subsites
- https redirect (with .htaccess) redirect loop
- homepage redirects to login page when user session expires
- How to redirect user to a specific page based on username?
- How to publish new posts/pages in root instead of subfolder, but keep old structure in place?
- forward domain name to particular page?
- Contact Form 7 Data to Whatsapp Link
- I need to redirect an entire subdirectory in WordPress to the homepage – is this correct?
- I get redirected too many times only in wp-admin?
- Redirecting Pages That No Longer Exist — But Could in the Future
- About to migrate site to new domain
- HTML Redirect to WP pages
- Is WordPress API visible from PHP file called in htaccess
- Changing theme = change home page for mobile visitors?
- Redirect User on Login based on role WP 3 – Multi-Site
- How to redirect an old page url to the homepage
- Delete Redirect Slug For Specific Post
- Duplicated WP site manually, now links redirect wrong [closed]
- All URLs Redirect to Main Page
- Parked domain redirecting to wrong error404 page
- Subdomain redirect problem
- redirect from old URL structure
- how can i redirect dynamic URL in worpress base on ID in htaccess or wp-config or function.php
- Error in /blog redirection – ubuntu default WP installation
- wordpress automatic URL ‘page’ parameter rewrite
- How to redirect user to the specific URL and display notice
- WordPress not loggin user and redirecting after custom registration
- How to 301 redirect to subdirectory but keep access to wp-admin of main domain
- Pagination redirect set in .htaccess file is not working
- Redirect after empty register form
- Moving Posts to a new site and maintaining URLs
- WordPress 3.0 Multisite – Child sites and backends appearing blank
- Post Migration Site Migration Redirects All Known Solutions Attempted