0 Replies Latest reply on Mar 15, 2007 10:41 AM by jonnybennett

    url rewrite

    jonnybennett Level 1
      I have multiple domains on my server. The following htaccess should mean that when someone types the url…..
      www.mydomain.com
      It will go to the index.htm file within the mydomainFolder directory.
      If someone should type…
      www.mydomain.com/username
      It will redirect to profile.php which will be able to use ‘username’ as a variable.

      RewriteCond %{HTTP_HOST} mydomain.com$ [NC]
      RewriteCond %{REQUEST_URI} !^/mydomainFolder/.*$
      RewriteRule ^(.*)$ mydomainFolder/profile.php?userId=$1 [L]

      Problem is that when someone simply types www.mydomain.com, this is also being rewritten to the profile.php. Any ideas.

      Many thanks, this is drviing me crazy J.