views:

54

answers:

2

I am trying to rewrite from mysite.com/pokerbono/xyz to mysite.com/pokerbono.php?id=XYZ Here is the code I added in the .htaccess:

#### Affiliate Links

RewriteRule ^pokerbono/([a-zA-Z0-9_-]+)$ pokerbono.php?id=$1 [L]

What is wrong with this rule? I tried like 100 variations and always receive a 404.

I tried each and every variation right now I have in my .htaccess the following rows:

RewriteRule ^pokerbono/([a-zA-Z0-9_-]+)$ pokerbono.php?id=$1 [L]

RewriteRule ^pokerbono/([a-zA-Z0-9_-]+)/$ pokerbono.php?id=$1 [L]

RewriteRule ^/pokerbono/([a-zA-Z0-9_-]+)$ pokerbono.php?id=$1 [L]

RewriteRule ^/pokerbono/([a-zA-Z0-9_-]+)/$ pokerbono.php?id=$1 [L]

RewriteRule ^/pokerbono/([a-zA-Z0-9_-]+)$ /pokerbono.php?id=$1 [L]

RewriteRule ^/pokerbono/([a-zA-Z0-9_-]+)/$ /pokerbono.php?id=$1 [L]

A: 

Try including slashes on the front:

RewriteRule ^/pokerbono/([a-zA-Z0-9_-]+)$ /pokerbono.php?id=$1 [L]

UPD:

This works in my environment:

RewriteEngine On
RewriteRule ^qwe/([-_a-zA-Z0-9]*)$ qwe.php?id=$1 [L]
newtover
i tried each and every variation, right now I have in the .htacces this:RewriteRule ^pokerbono/([a-zA-Z0-9_-]+)$ pokerbono.php?id=$1 [L]RewriteRule ^pokerbono/([a-zA-Z0-9_-]+)/$ pokerbono.php?id=$1 [L]RewriteRule ^/pokerbono/([a-zA-Z0-9_-]+)$ pokerbono.php?id=$1 [L]RewriteRule ^/pokerbono/([a-zA-Z0-9_-]+)/$ pokerbono.php?id=$1 [L]RewriteRule ^/pokerbono/([a-zA-Z0-9_-]+)$ /pokerbono.php?id=$1 [L]RewriteRule ^/pokerbono/([a-zA-Z0-9_-]+)/$ /pokerbono.php?id=$1 [L]
Tobias
@Tobias: updated my answer.
newtover
A: 

I had to disable Multiviews, now it is working fine :)

Tobias