The web server is Apache. I want to rewrite URL so a user won\'t know the actual directory. For example: The original URL:
http://www.example.com
I would suggest the following rule:
RewriteCond %{HTTP_HOST} ^(?!www)([^.]+)\.mydomainname\.com$ [NC] RewriteRule ^(w+)/(\d+)$ /$1/%1/%1.php?%1_id=$2 [L]