This forum has been moved here:
Helicon Tech Community Forum

  Active TopicsActive Topics  Display List of Forum MembersMemberlist  HelpHelp   RegisterRegister  LoginLogin
Common Questions (Forum Locked Forum Locked)
 Helicon Tech : Common Questions
Subject Topic: not displaying url if www is include (Topic Closed Topic Closed)
Author
Message |
rezdragon
Newbie


Joined: 01 October 2008
Location: United States
Posts: 7
Posted: 02 October 2008 at 10:21am  

ok here is my problem.
if i type in www.subdomain.site.com
i get a 404
if i type in subdomain.site.com it goes to the page i want it to ;

i am using this

[ISAPI_Rewrite]

# Defend your computer from some worm attacks
RewriteRule .*(?:global.asa|default\.ida|root\.exe|\.\.).* . [F,I,O]

# Convert http://autsp.com to http://www.autsp.com/
RewriteCond Host: ^autsp.com
RewriteRule (.*) http\://www\.autsp.com$1 [I,RP]

# Assuming we have limited number of shared folders.
# We will execute them accordingly regardless of the subdomain.
# autsp: http://sub1.autsp.com/img/logo.jpg -> /img/logo.jpg
# autsp: http://www.autsp.com/img/logo.jpg -> /img/logo.jpg
RewriteRule (/css/.*) $1 [I,O,L]
RewriteRule (/js/.*) $1 [I,O,L]
RewriteRule (/img/.*) $1 [I,O,L]


#Redirect all other subdirectories not matching
#to the list above as subdomains
#autsp: www.autsp.com\sub1 -> sub1.autsp.com
# RewriteCond Host: www\.highspeed\.com
# RewriteRule /(\w*)/(.*) http\://$1\.autsp\.com$2 [I,RP]

# If the web site starts with www then point the file to the root folder
# If you specifically created a folder /www/ then you can comment out this section.
RewriteCond Host: (?:www\.)autsp.com
RewriteRule (.*) $1 [I,O,L]

# Any web site starts other than www will be re-mapped to /<subdomain>/
# autsp: http://sub1.autsp.com/default.asp -> /sub1/default.asp
# Note: if the folder does not exists, then the user will get a 404 error automatically.
RewriteCond Host: (.*)\.autsp.com
RewriteRule (.*) /$1$2 [I,O,L]


#Fix missing slash char on folders
#This has to be at the end because if invalid dir exists,
#we should show 404 first
RewriteCond Host: (.*)


RewriteCond Host: ^http://www\.(.*)\.autsp.com
RewriteRule (.*)\.autosp.com$1
Back to Top
 
rezdragon
Newbie


Joined: 01 October 2008
Location: United States
Posts: 7
Posted: 02 October 2008 at 12:11pm  

what i am really looking for is when www.subdomain.site.com is typed in it looks to the file sees if there is a file there loads the page and then redirrects out to the right site. I am trying to track customers from print publication by changing their url to mine for a second then sending them on their way to the customers site.

So i will have a list of subdomains and a index page with a google analitics code on it with a 0 second meta refresh. but being that there are alot of dumb people in the world and even if you print http://subdomain.site.com they will type in www.subdomain.site.com causing a 404 error and they will not get to the page i have intended them to get to
Back to Top
 
Lexey
Moderator Group


Joined: 15 August 2002
Location: Russian Federation
Posts: 8119
Posted: 06 October 2008 at 12:37pm  

Try to add this rule before the others:

RewriteCond Host: www\.(.*\.autsp\.com)
RewriteRule (.*) http\://$1$2 [I,RP]
Back to Top
 
rezdragon
Newbie


Joined: 01 October 2008
Location: United States
Posts: 7
Posted: 08 October 2008 at 8:47am  

well that now work love it. thank you sooo much

now as a follow up question because i didn;t check this out before hand... say i registered a site with godaddy.com and i am hosting the site locally and i don;t have the dns hosted on this site and wanted to use the go daddy dns. is there anything special that i need to do other then set the www and the *  to go to the ip?
Back to Top
 
Lexey
Moderator Group


Joined: 15 August 2002
Location: Russian Federation
Posts: 8119
Posted: 08 October 2008 at 3:13pm  

ISAPI_Rewrite does not require any additional configuration. As for DNS, I do not know what is "go daddy dns", so I can not help you there.
Back to Top
 

Sorry, you can NOT post a reply.
This forum has been locked by a forum administrator.

Printable version Printable version
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum