|
-
Jul 29th, 2005, 09:06 AM
#1
Thread Starter
PowerPoster
URLS and Redirecting
All,
I have a url xyz.com where there is a form to be submitted to xyz.com/test.aspx
Everything works great!
However we also had to create another url subdomain.xyz.com that also points to that page xyz.com.
Upon form submit, we get a page not found because the code is looking for xyz.com and not subdomain.xyz.com.
How do we fix?
Thanks
-
Jul 29th, 2005, 09:54 AM
#2
Frenzied Member
Re: URLS and Redirecting
You must submit to the absolute URL i.e. http://subdomain.xyz.com/test.aspx as browsers treat subdomains as completely unrelated websites.
I think that's what you were getting at - let me know if I've misunderstood.
DJ
If I have been helpful please rate my post. If I haven't tell me!
-
Jul 29th, 2005, 09:56 AM
#3
Thread Starter
PowerPoster
Re: URLS and Redirecting
 Originally Posted by dj4uk
You must submit to the absolute URL i.e. http://subdomain.xyz.com/test.aspx as browsers treat subdomains as completely unrelated websites.
I think that's what you were getting at - let me know if I've misunderstood.
DJ
What you are suggesting is the very thing that gives us the error because there is no pges on that subdomain. It is just a DNS entry pointing to xyz.com.
-
Jul 29th, 2005, 10:08 AM
#4
Frenzied Member
Re: URLS and Redirecting
Ah right gotcha!
Why the need for the subdomain if you don't mind me asking?
DJ
If I have been helpful please rate my post. If I haven't tell me!
-
Jul 29th, 2005, 10:11 AM
#5
Thread Starter
PowerPoster
Re: URLS and Redirecting
 Originally Posted by dj4uk
Ah right gotcha!
Why the need for the subdomain if you don't mind me asking?
DJ
client request
-
Jul 29th, 2005, 10:45 AM
#6
Frenzied Member
Re: URLS and Redirecting
I use the RewritePath method in the Application_BeginRequest method of a global.asax file to do URL rewriting e.g. form posted to /home.aspx actually is executed by the page /html/home.aspx - still shows /home.aspx in address bar. But I've never tried this on different subdomains.
You could try adding this global.asax file to the root of subdomain.xyz.com.
Code:
void Application_BeginRequest(Object sender , EventArgs e)
{
Context.RewritePath( "http://www.xyz.com" + Request.Path );
}
I have a feeling this only works on the same subdomain I'm afraid.
The other option is looking into installing a ISAPI filter on the subdomain such as OpUrl - this intercepts the request at an earlier point and should work. You can download a 14 day trial to test.
DJ
If I have been helpful please rate my post. If I haven't tell me!
-
Jul 29th, 2005, 10:49 AM
#7
Thread Starter
PowerPoster
Re: URLS and Redirecting
thanks for the suggestion but what we did was simply hardcode the thank you page url in the form submit. It works for now.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|