Last post Nov 28, 2017 06:09 AM by Cathy Zou
Nov 27, 2017 08:03 AM|jfr|LINK
I'm running my web app on http://mywebsite.com but using some methods to get the current url I can get http://mywebsite.com/default.aspx
How is it possible to get http://mywebsite.com
If I call http://mywebsite.com/default.aspx?
then I need to get http://mywebsite.com/default.aspx?
If I call http://mywebsite.com
then I need to get http://mywebsite.com
Tell me please how is it possible?
Nov 27, 2017 09:11 AM|PatriceSc|LINK
Explain rather what you are trying to do.
IMO you'll never able to know that from the server side as
http://mywebsite.com doesn't match anything in your app but is handled by the web server by serving the default page (maybe after a redirect). So from your app perspective you'll see that default.aspx
is the current url being accessed when mywebsite.com is used (which is correct).
This is why we need to know your real goal. For example if this is a SEO issue you can tell search engines that mywebsite.com and mywebsite.com/default.aspx is actually serving
the same page.
Nov 27, 2017 01:49 PM|oned_gk|LINK
Nov 28, 2017 06:09 AM|Cathy Zou|LINK
This will get you the full URL:
Take a look at the following links: