I want to change all actions like this http://action.site.com/
My server is Apache 2.1.11 and have mod rewrite i use this
- Code: Select all
Options +FollowSymLinks
RewriteEngine On
# Rewrite sub domains.
RewriteCond %{ENV:REDIRECT_STATUS} ^$
RewriteCond %{HTTP_HOST} !^www\.site\.com$ [NC]
RewriteCond %{HTTP_HOST} ^(www\.)?([^\.]+)\.site\.com$ [NC]
RewriteRule ^(.*)$ /forum/index.php?action=%2 [QSA,L]
Actions works fine but my real subdomains not work (www work fine), get 501 error.
Can you help me ?