DR_GIGGULS
30-Jul-2007, 11:25 AM
Hello.
For this thing you must have wildcard dns and mod_rewrite enabled.
.htaccess:
DirectoryIndex new_forum.php index.php index.html
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ handler.php?_url=$1&%{QUERY_STRING} [L]
rewriteBase /
rewriteCond %{HTTP_HOST} ([^.]+)\.domain\.com [NC]
rewriteCond %{HTTP_HOST} !^www\.domain\.com
rewriteRule ^$ /%1
Obviously you have to replace "domain" with your domain.
You save this as .htaccess and replace the original NBS one.
Changelog:
27.09.2007:
- now opening your domain will open the new_forum.php page
- if new_forum.php does not exist, the indexes will be the default ones
Done.
Tested and works fine.
For this thing you must have wildcard dns and mod_rewrite enabled.
.htaccess:
DirectoryIndex new_forum.php index.php index.html
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ handler.php?_url=$1&%{QUERY_STRING} [L]
rewriteBase /
rewriteCond %{HTTP_HOST} ([^.]+)\.domain\.com [NC]
rewriteCond %{HTTP_HOST} !^www\.domain\.com
rewriteRule ^$ /%1
Obviously you have to replace "domain" with your domain.
You save this as .htaccess and replace the original NBS one.
Changelog:
27.09.2007:
- now opening your domain will open the new_forum.php page
- if new_forum.php does not exist, the indexes will be the default ones
Done.
Tested and works fine.