.htaccess rewriterule - please help, quick fix?

Discussion in 'Apache' started by monkeyclap, Nov 29, 2010.

  1. #1
    hi,

    i have the following code to forward something like www.domain.com/something-here to www.domain.com/go.php?go=something-here

    it seems to work ok but for some reason when "." is included it doesn't work, e.g. something like www.domain.com/digitalpoint.com doesn't work

    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^www\.domain\.com$ [NC]
    RewriteRule ^.*$ http://domain.com%{REQUEST_URI} [R=301]
    RewriteRule ^([^/\.]+)/?$ go.php?go=$1 [L]
    Code (markup):
    any help appreciated - many thanks in advance!
     
    monkeyclap, Nov 29, 2010 IP