OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

pdf file redirection to wp page

  • Thread starter Thread starter user25673091
  • Start date Start date
U

user25673091

Guest
I can't redirect a PDF URL to a content page on my WordPress site. PDFs are in /wp-content/uploads/. Tried plugins and .htaccess codes with no success.

E.g., redirect: /wp-content/uploads/2023/12/some-files.pdf to /my-content-page/.

or suggest some plugins that you think can redirect it. I have also tried cpanel redirection

Used various wp plugins to redirect

applied following rules in .htaccess

Code:
RewriteEngine On 
RewriteCond %{REQUEST_URI} ^/wp-content/uploads/2023/12/some-files.pdf$ [NC] 
RewriteRule ^(.*)$ https://example.com/page1 [R=301,L]
<p>I can't redirect a PDF URL to a content page on my WordPress site. PDFs are in /wp-content/uploads/. Tried plugins and .htaccess codes with no success.</p>
<p>E.g., redirect: /wp-content/uploads/2023/12/some-files.pdf to /my-content-page/.</p>
<p>or suggest some plugins that you think can redirect it. I have also tried cpanel redirection</p>
<p>Used various wp plugins to redirect</p>
<p>applied following rules in .htaccess</p>
<pre><code>RewriteEngine On
RewriteCond %{REQUEST_URI} ^/wp-content/uploads/2023/12/some-files.pdf$ [NC]
RewriteRule ^(.*)$ https://example.com/page1 [R=301,L]
</code></pre>
Continue reading...
 
Top