Jump to content

.htaccess redirect *.pdf to /newdir/*pdf


mameha

Recommended Posts

I want to redirect all requests for .pdf files from one dir to another.

OLD DIR:  www.domain.com/en/product/pdf/
NEW DIR: www.domain.com/global_pdf/

...so when someone requests:
www.domain.com/en/product/pdf/john.pdf

it loads:
www.domain.com/global_pdf/john.pdf

I think I need to use RedirectMatch or RedirectRule  to check for *.pdf but I have no idea how to write the expression matching thing.

Can anyone help with this?
Link to comment
https://forums.phpfreaks.com/topic/35480-htaccess-redirect-pdf-to-newdirpdf/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.