PDA

View Full Version : How to setup subdomains?



vidya
06-27-2006, 04:49 PM
I have users who register as members on our site. It's called opednews.com

They each get a members page at:
opednews.com/author/authorxx.html
where xx is their member number.

How can I set things up so that their authors page is:
membername.opednews.com ??

For example, is there a way to translate membername.opednews.com
to opednews.com/author/authorxx.html ??

Or some better way?

Thanks

..Vidya
www.opednews.com

areidmtm
06-27-2006, 10:15 PM
go into cPanel and create the subdamain you want. Then open the file called .htaccess in a text editor and add this line



RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www.)?authorxx.opednews.com$
RewriteCond %{REQUEST_URI} !^/author/authorxx.html
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /author/authorxx.html$1
RewriteCond %{HTTP_HOST} ^(www.)?authorxx.opednews.com$
RewriteRule ^(/)?$ author/authorxx.html [L]


Try that and see if it works...it works for me