vault-boy
vault-boy

Reputation: 523

rewriting rules acting weird

Something's very weird is happening to my rewriting rules when moved to shared hosting environment (and into .htaccess file)

While working locally on WAMP everything worked fine for those rules

RewriteRule confirmation/([0-9a-zA-Z_-]+)/([0-9a-zA-Z_-]+)$ /index.php?action=confirmation&type=$1&item=$2
RewriteRule bump/([0-9a-zA-Z_-]+)$ /index.php?action=bump&item=$1
RewriteRule item/([0-9a-zA-Z_-]+)$ /index.php?action=item&item=$1
RewriteRule item_login/([0-9a-zA-Z_-]+)/([0-9a-zA-Z_-]+)$ /index.php?action=item_login&type=$1&item=$2

Now tho it's acting weird. For example When I go to this url /confirmation/bump/1330384419_product I don't get confirmation page as I should, but I'm seeing the page that should appear for /bump/1330384419_product. If I remove that second rewriting rule from htaccess and refresh, I get the confirmation page correctly. Similar behavior is for item and item_login rules.

I don't know what the hell is going on

Upvotes: 0

Views: 49

Answers (1)

Umbrella
Umbrella

Reputation: 4788

Is there a reason you are not using the ^ to indicate the start of your pattern should match the start of the request, just as you use $ to indicate the ends match?

Upvotes: 1

Related Questions