NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page mod rewrite with subdomains

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.

Advanced Search


Closed Thread
 
LinkBack Thread Tools
Old 12-22-2005, 12:03 AM THREAD STARTER               #1 (permalink)
NamePros Regular
Join Date: Feb 2004
Location: Student @ UConn
Posts: 411
gamex has a spectacular aura aboutgamex has a spectacular aura about
 



mod rewrite with subdomains


My host set up a wildcard subdomain, now all I need to do is get my mod rewrite to work.

Let me explain

I have a wildcard subdomain set up, and its folder is http://www.mydomain.com/wildcard/

The wildcard sub is set up for an addon domain, whose folder is http://www.mydomain.com/domaintwo/

I have the following code, I thought it wuold work, but its not

PHP Code:
RewriteEngine on
RewriteCond 
%{HTTP_HOST} !^www\.
RewriteCond %{HTTP_HOST} ^([^.]+)\.domaintwo\.com
????: NamePros.com http://www.namepros.com/programming/150262-mod-rewrite-with-subdomains.html
RewriteRule 
^$ http://www.domaintwo.com/folder/userpage.php?id=%1 
The problem is is that its trying to look for that page in http://www.mydomain.com/wildcard/fol...erpage.php?id= instead of http://www.domaintwo.com/folder/userpage.php

Any ideas?
__________________
Joe
gamex is offline  
Old 12-23-2005, 12:57 AM THREAD STARTER               #2 (permalink)
NamePros Regular
Join Date: Feb 2004
Location: Student @ UConn
Posts: 411
gamex has a spectacular aura aboutgamex has a spectacular aura about
 



Nevermind, I fixed it:

PHP Code:
RewriteEngine on
RewriteCond 
%{HTTP_HOST} !^www\.
RewriteCond %{HTTP_HOST} ^([^.]+)\.domaintwo\.com
????: NamePros.com http://www.namepros.com/showthread.php?t=150262
RewriteRule 
^(.*)$ http://www.domaintwo.com/folder/userpage.php?id=%1 [R=301,L] 
__________________
Joe
gamex is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Mod ReWrite Job dalmuti Web Development Wanted 0 11-16-2005 02:14 PM
Question with mod rewrite gamex Programming 6 06-29-2005 06:07 AM
phpbb mod instlation help needed ill pay 20$ a mod jamieneil Website Development 6 05-02-2005 08:17 AM
mod rewrite dotcommakers Website Development 2 01-22-2005 11:05 PM

Liquid Web Smart Servers  
All times are GMT -7. The time now is 03:26 AM.

Managed Web Hosting by Liquid Web
Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger