Active TopicsActive Topics  Display List of Forum MembersMemberlist  HelpHelp   RegisterRegister  LoginLogin
ISAPI_Rewrite 2.x
 Helicon Tech : ISAPI_Rewrite 2.x
Subject Topic: setting up a sub domain redirect Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
nineseven
Newbie
Newbie


Joined: 18 June 2010
Online Status: Offline
Posts: 4
Posted: 18 June 2010 at 3:45am | IP Logged Quote nineseven

0

I'm trying to set up a sub domain for development on a windows server and am having problems setting the correct details in the httpd.ini file and hoped someone could help.

I have set up the subdomain

http://dev.website.com

The files that I want to use for this subdomain are on the server in a folder called development

http://www.website.com/development

in the directory structure they are in

/htdocs/development

What do I need to add the the httpd.ini file to point the http://dev.website.com to the files located in the /htdocs/development folder on the server?


I've searched for a sloution on the forum and google but nothing seemd to be working for me.

Thanks in advance for your help
Back to Top View nineseven's Profile Search for other posts by nineseven
 
Anton
Admin Group
Admin Group


Joined: 30 January 2007
Location: Ukraine
Online Status: Offline
Posts: 10489
Posted: 18 June 2010 at 5:05am | IP Logged Quote Anton

Please try to use the following rules:

[ISAPI_Rewrite]
RewriteCond Host: dev\.website\.com
RewriteRule (.*) http://www.website.com/development$1 [RP]

__________________
Regards,
Anton
Back to Top View Anton's Profile Search for other posts by Anton
 
nineseven
Newbie
Newbie


Joined: 18 June 2010
Online Status: Offline
Posts: 4
Posted: 18 June 2010 at 5:11am | IP Logged Quote nineseven

Thanks Anton,

That worked the first time I tried it but now its redirecting to:

http://www.development.com//

Any ideas? Its the first time i've used ISAPI rewrite so i'm a real novice with it.


Back to Top View nineseven's Profile Search for other posts by nineseven
 
Anton
Admin Group
Admin Group


Joined: 30 January 2007
Location: Ukraine
Online Status: Offline
Posts: 10489
Posted: 18 June 2010 at 7:29am | IP Logged Quote Anton

You mean http://www.website.com/development// right?
Does it happen all the time now?
Do you have any other rules in the config?

__________________
Regards,
Anton
Back to Top View Anton's Profile Search for other posts by Anton
 
nineseven
Newbie
Newbie


Joined: 18 June 2010
Online Status: Offline
Posts: 4
Posted: 18 June 2010 at 7:51am | IP Logged Quote nineseven

No it goes to http://development.com//

There is also teh following in the file:

#RewriteRule ([^.?]+[^.?/]) http\://$1$2 [I,R]

#RewriteCond Host: (.*)
RewriteRule ([^.?]+/) http\://$1/$2 [R]
RewriteRule ([^.?]+[^.?/]) $1/ [I,L]

# Fix missing slash charachter on folders
RewriteCond Host: (.*)
RewriteRule ([^.?]+[^.?/]) http\://$1$2/ [I,R]

Will this effect the subdomain redirect ?

Thanks

Back to Top View nineseven's Profile Search for other posts by nineseven
 
Anton
Admin Group
Admin Group


Joined: 30 January 2007
Location: Ukraine
Online Status: Offline
Posts: 10489
Posted: 18 June 2010 at 9:55am | IP Logged Quote Anton

"Will this effect the subdomain redirect ?"
- yes, it may interfere...

Could you please explain what do you use these lines for:

RewriteRule ([^.?]+/) http\://$1/$2 [R]
RewriteRule ([^.?]+[^.?/]) $1/ [I,L]

Also please tell what is the testing request you make.

__________________
Regards,
Anton
Back to Top View Anton's Profile Search for other posts by Anton
 
nineseven
Newbie
Newbie


Joined: 18 June 2010
Online Status: Offline
Posts: 4
Posted: 18 June 2010 at 10:45am | IP Logged Quote nineseven

I'm not sure what they do.

Ive inherited this site from someone else and this is what they added. I cant ask as they are away now for a few weeks.

what do you mean by testing request ? do you mean how i am testing that its working or a testing request from within the httpd.ini file?
Back to Top View nineseven's Profile Search for other posts by nineseven
 
Anton
Admin Group
Admin Group


Joined: 30 January 2007
Location: Ukraine
Online Status: Offline
Posts: 10489
Posted: 21 June 2010 at 3:04am | IP Logged Quote Anton

"what do you mean by testing request?"
I mean, what URL do you put in the address bar to see if the rule we've written is working.

Also, please show the abstract of IIS log for this request.

__________________
Regards,
Anton
Back to Top View Anton's Profile Search for other posts by Anton
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
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