Solved

Need to reference domain name from IP

Posted on 2009-04-14
7
430 Views
Last Modified: 2013-11-11
My Flash video chat room needs to be referenced from the domain. I have a dedicated Windows 2003 server wherein my Red5 is in the C:\Program Files\Red5 folder and all my web domains are in the D:\Websites folder path. Now, in each domain, I'd like to create a folder for their own video chat room, but in my flash actionscript, the IP is part of the path (Please see attached snippet). So, I need to know how I can include a domain folder in this path where the value = /red5chat/. So, let's say one website on my server is at www.mydomain.com, I was thinking of changing the value to something like this
http://"+_root.IP+"/mydomain.com/testlogin.php but that doesn't work. Hence this question for Expert help: How can I do this?

edit the FLA red5Chat.fla and configure these lines:
_root.IP = "88.191.36.127";
_root.port=1934;
_root.authentificateURL = "http://"+_root.IP+"/red5chat/testlogin.php";
_root.infoUserURL="http://"+_root.IP+"/red5chat/infouser.php";

Open in new window

0
Comment
Question by:John Account
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 15

Expert Comment

by:oobayly
ID: 24147303
Do you want a single Virtual Website in IIS that contains a list of directories, each directory for a domain?
Are you wanting to use a single compiled version of the Flash program, or is the snippet a config file for the flash program, which will reside in the domain?
I'm afraid I can't work out what exactly you want the end result to look like.
0
 

Author Comment

by:John Account
ID: 24149176
This is actionscript in a single .Fla file: "http://"+_root.IP+"/red5chat/testlogin.php";
Where it reads "/red5chat/" is a folder in "C:\Program Files\Red5" on my dedicated server.
0
 

Author Comment

by:John Account
ID: 24170588
I'm not going to get any help here, am I?
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 15

Expert Comment

by:oobayly
ID: 24171268
Sorry mate, but I really I really don't get what you need. A lack of answers tends to imply that other users don't either.
I've never used Red5, so regarding the flash configuration I'm not going to be much use, but I've got a fair amount of experience regarding IIS & .Net

This is the setup I think you want is this:
IIS
  -  mydomain.com -> http://88.191.36.127/mydomain.com/testlogin.php
  - foo.com -> http://88.191.36.127/foo.com/testlogin.php
  - bar.com -> http://88.191.36.127/bar.com/testlogin.php
  - 88.191.36.127
      - /mydomain.com/testlogin.php
      - /foo.com/testlogin.php
      - /bar.com/testlogin.php

Is this correct, if not can you explain the setup you want.

What's stopping your adding a virtual directory in each domain, then you don't have to reference the actionscript uri by IP.
If you just want single login page, can't you modify login.php to accept the domain as a querystring?
0
 

Author Comment

by:John Account
ID: 24199148
Well, it sure seems like you understand, Mate, as you have written http://88.191.36.127/mydomain.com/testlogin.php. You see, Mate, I have a dedicated server, and the _root.IP = "88.191.36.127"; represents my dedicated server on which Red5 is installed. However, on my dedicated server, there are several domain names in my D drive. Can you see what I'm trying to say now?
0
 
LVL 15

Accepted Solution

by:
oobayly earned 500 total points
ID: 24202693
Well, then it seems all you need to do is set up a set of redirect rules. This is a an ISAPI filter that I use to rewrite requests for our webserver:
http://www.codeplex.com/IIRF

You'd have something like this in the ini file:

# If the requested host matches any of the following domains
# foo.com
# mydomain.com
# bar.com
# www subdomain is optional
RewriteCond %{HTTP_HOST}  ^(www.)?(abcd.com|mydomain.com|anotherdomain.com)$
RedirectRule  ^/foobarbaz$ http://88.191.36.127/%2/testlogin.php [R]
0
 

Author Closing Comment

by:John Account
ID: 31570090
Hmmmnnnn....well this sure is an excellent solution to my problem. Thanks!
0

Featured Post

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
Prologue It is often required to host multiple websites on a single instance of IIS, mostly in development environments instead of on production servers. I am sure it is not much a preferred solution on production servers but this is at least a pos…
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question