php - htaccess redirect doesn't work for zip.files -


i'm trying redirect auto-generated cms link zip file hosting. redirect in htaccess file looks approx this(and doesn't work):

redirect /files/generated.zip http://somehosting.com/something.zip 

when try - works:

redirect /files/generated http://somehosting.com/something.zip redirect /files/generated.html http://somehosting.com/something.zip 

please, give me direction how hack this.

by way, stuff worked ok before site moved other hosting (maybe here deployed newer software causes weird behavior...)

you need use way..

rewriterule ^uplaod/[0-9]{4}/[0-9]{2}/(.+?\.(?:zip|7z|rar))$ /test.php?file=$1 [r=301,l,nc] 

Comments

Popular posts from this blog

javascript - Karma not able to start PhantomJS on Windows - Error: spawn UNKNOWN -

Nuget pack csproj using nuspec -

c# - Display ASPX Popup control in RowDeleteing Event (ASPX Gridview) -