Or Weinberger
Or Weinberger

Reputation: 7482

What's wrong with this htaccess entry?

Why isn't this working?

RewriteEngine on
RewriteRule ^/filter/([A-Za-z0-9])*$ /index.php?filter=$1

Trying to get this: http://www.site.com/filter/whatever-is-here

loading this: http://www.site.com/filter/index.php?filter=whatever-is-here

Upvotes: 0

Views: 22

Answers (1)

Mitch Dempsey
Mitch Dempsey

Reputation: 39929

RewriteEngine on
RewriteRule ^/filter/([A-Za-z0-9]*)$ /index.php?filter=$1

You misplaced the *, it needs to be on the character class.

Also, if you want to have things-with-dashes, then you would need to use [-A-Za-z0-9] as your character class

Upvotes: 3

Related Questions