Reputation: 33
I am trying to redirect all files in a particular directory in my web server.
I am trying regular expressions such as
Redirect /data/january\/([a-zA-Z0-9]*).([a-zA-Z]*) http://www.mysite.com/sample
The expression /([a-zA-Z0-9]*).([a-zA-Z]*)
is trying to find expressions such as dat35262.pdf.
But its not working. Can you help me out?
Upvotes: 3
Views: 186
Reputation: 25302
You should use RedirectMatch
, Redirect
does not handle regexp. Try :
RedirectMatch /data/january\/([a-zA-Z0-9]*)\.([a-zA-Z]*)$ http://www.mysite.com/sample
Upvotes: 1