Mathias
Mathias

Reputation: 334

What's the proper redirect rule (to avoid redirect loop)

I want to redirect a broken filename 'artist_-title' to 'artist-_title.zip'. I tried this in .htaccess:

RedirectMatch 301 artist_-_title artist_-_title.zip

I think I do understand what causes the loop, but I don't know much about regular expressions.

Upvotes: 0

Views: 186

Answers (1)

Milad Naseri
Milad Naseri

Reputation: 4118

You should write something like this:

RedirectMatch 301 artist_-_title$ artist_-_title.zip

Upvotes: 1

Related Questions