Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Coding Forum


You are currently viewing our Coding Forum as a guest. Please register to participate.
Login



Reply
htaccess subdomain mod rewrite silent redirect
Old 09-07-2006, 09:46 PM htaccess subdomain mod rewrite silent redirect
Average Talker

Posts: 15
Trades: 0
hello!
i have a website with multi forum http://talkorchat.com/

when new forum with login "zzz" is done it looks like this
ARMY.MILITARY.GOV :: Index

i want to make it look like a subdomain, so it would be always like this
http://zzz.talkorchat.com/

how to do that with .htaccess modrewrite?
eugene2008 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 09-09-2006, 10:42 AM Re: htaccess subdomain mod rewrite silent redirect
Rufo's Avatar
Extreme Talker

Posts: 173
Trades: 0
You need to use mod_rewrite and wildcard A records in your DNS to do this.
__________________

Please login or register to view this content. Registration is FREE
Rufo is offline
Reply With Quote
View Public Profile Visit Rufo's homepage!
 
Old 09-10-2006, 10:21 AM Re: htaccess subdomain mod rewrite silent redirect
Average Talker

Posts: 15
Trades: 0
i solved partially my problem

##################################################
<Directory "C:/aweb/freehosting">
Options Indexes Includes FollowSymLinks ExecCGI
AllowOverride all
Order allow,deny
Allow from all
</Directory>

<VirtualHost *:80>
DocumentRoot "C:/aweb/freehosting"
ServerName pcsny.org
ServerAlias www.pcsny.org
php_admin_value open_basedir "/"
Options +FollowSymLinks
RewriteEngine On
RewriteRule ^/users/([^/]+)(/(.*))?$ http://$1.pcsny.org/$3 [R=301,L]
RewriteCond %{HTTP_HOST} ^pcsny\.org
RewriteCond %{REQUEST_URI} ^(.*)
RewriteRule (.*) http://www.pcsny.org/%1 [R=301,L]

</VirtualHost>

<VirtualHost *:80>
ServerName pcsny.org
ServerAlias *.pcsny.org
VirtualDocumentRoot "C:/aweb/freehosting/users/%1/"
php_admin_value open_basedir "C:/aweb/freehosting/users/"
</VirtualHost>

################################################## ##

but this way it does not jail user in their respective folders
so i tried this
VirtualDocumentRoot "C:/aweb/freehosting/users/__%1/"
php_admin_value open_basedir "C:/aweb/freehosting/users/__"


but alas does not work
error logs say cant find %username%__

how to fix it?
i am almost done there
</VirtualHost>
eugene2008 is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to htaccess subdomain mod rewrite silent redirect
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.44944 seconds with 12 queries