mameha Posted January 24, 2007 Share Posted January 24, 2007 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.pdfit loads:www.domain.com/global_pdf/john.pdfI 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 More sharing options...
ToonMariner Posted January 24, 2007 Share Posted January 24, 2007 IF all your pdfs are in one directory then this should workRewriteRule \/(!?\/)*+\.pdf$ global_pdf/$1.pdf [NC,L] Link to comment https://forums.phpfreaks.com/topic/35480-htaccess-redirect-pdf-to-newdirpdf/#findComment-167954 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.