Reg Expression htaccess RewriteRule
- by Rick
I am new to using regular expressions for rewriting URL's in htaccess
I need to redirect mysite.com/123 to mysite.com/, IF cookie named 'ref' is set.
my current htaccess is:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_COOKIE} ref=true [NC]
RewriteRule ^/([0-9]+)/$ http://www.mysite.com
</IfModule>
The…