Page is a not externally linkable
- Code, Content, and Presentation
-- Apache Web Server
---- Subdomain - variable Mod Rewrite doesnt work. Please help


jdMorgan - 8:39 pm on Oct 16, 2005 (gmt 0)


I don't use Plesk, but the following code is correct:

Options +FollowSymLinks
RewriteEngine on
RewriteCond %{REQUEST_URI} !^/viewforum\.php$
RewriteCond %{HTTP_HOST} !^www\.
RewriteCond %{HTTP_HOST} ^([^.]+)\.example\.com
RewriteRule .* http://www.example.com/viewforum.php?f=%1 [L]

Also, "It doesn't work" is not enough information to determine what the problem might be.

Jim


Thread source:: http://www.webmasterworld.com/apache/4866.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com