user562854
user562854

Reputation:

.htaccess 301 Redirect problem

I have the following code in .htaccess

redirect 301 /movies/ /list.php?category=13

It works, but when go to /movies/other.html, it also redirects to list.php, but I don't actually need that, as there is another rule that handles URLs of type ^movies/(.*)\.html$

Upvotes: 2

Views: 444

Answers (1)

Michael Berkowski
Michael Berkowski

Reputation: 270599

Use RedirectMatch and use the line ending $ in your match. Here the / may or may not be present.

RedirectMatch 301 /movies(/)?$ /list.php?category=13

Upvotes: 1

Related Questions