URL and Port redirect on IIS - iis

I'm struggling with an issue in IIS 8.5 which is about redirection and rewriting, but couldn't get a solution yet
we have an application driven Webpage running on IIS, but is not manageable.
This application can attached by browser using
http:// 10.172.100.242:81/appname/object?parameter
which is not really customer friendly. Up to the "?parameter" the URL is steady, parameter is changing.
I would prefer to have this url shown to the customer as
http:// appname.domain.com/parameter (best solution) or
http:// appname.domain.com/object?parameter
The combination of redirect and rewrite is too much for my knowledge
The rules I tried didn't work and now I have the hope to get some help from guys with better knowledge than mine...
Thanks in advance

First create a new website in IIS. Then configure as follows.
Inside the website create a folder called "parameter"
Select the "parameter" folder and set the redirect as show in the picture 2

Related

How do I redirect OldSite.com to NewSite.com/Sub/NewPage

I need to redirect several URLs to a new site that will have pages that replace the old sites. I don't care if the URL is masked or not. I just need the URL's to go to the new pages on the new combined site.
For example:
Oldsite.com redirects to NewSite.com/Sub/NewPage
Oldsite2.com redirects to NewSite.com/Sub/NewPage2
Oldsite3.com redirects to NewSite.com/Sub/NewPage3
and so on.
I've tried domain forwarding on the DNS level, but that isn't working (likely because of the subdirectories).
Problem is the New site was developed in Webflow and I don't have access to implement custom code for redirects.
My thought is to host a separate site to act as a hub that handles all the custom redirects to the New webflow site.
Any help or insight would be greatly appreciated.
Your scenario here isn't entirely clear on the types of redirections you're attempting to do.
If you're trying to redirect all paths from the old site to a specific destination page, like this...
oldsite.com/* ➜ newsite.com/sub/newpage
...many modern DNS providers support that.
If yours does not, you can switch your nameservers to Cloudflare DNS free edition, and you'll have the ability to define up to 3 page rules that support wildcard redirections like this.

2 Different Servers - sub domain redirect url masking

I have gone through a lot of posts about .htaccess but its not working as my websites are on 2 different servers.
I have 2 websites, both are on different servers. One is on Linux Server and the other is on Windows Server.
My main website is hosted on the linux server. Lets call this abc.com
My other website is hosted on windows server - lets call this as xyz.com
I have created a sub domain on abc.com, subdomain.abc.com
I want to redirect subdomain.abc.com to xyz.com without changing the url which should remain as subdomain.abc.com. I have tried all sorts of combination in .htaccess but it does not work. Can you please help.
Thanks
VJ
Use an IFrame instead of trying to do this with htaccess files/code.
Using htaccess to redirect the page but keep the URL structure and change the domain only
Edit|Update: Use iframes and not frameset. See this w3schools tutorial page. Adding an iframe is very simple so keep everything very simple - http://www.w3schools.com/tags/tag_iframe.asp

Is it possible to have a url redirect to another page and keep the original url in the title bar?

A marketer in my company has a landing page on our site: www.importantcompany.com/amazingproduct
They have a vanity url that goes to the landing page:
www.amazingproduct.com
I successfully created the iis redirect rule. However, the marketer has comeback and would like to keep the redirect rule, but keep the address in the bar www.amazingproduct.com instead of www.importantcompany.com/amazingproduct
I'm assuming that this is not possible.
The only way to make this work is to create a new site in iis and copy the landing page into the new site and set the new site to go to www.amazingproduct.com
Please let me know if my assumption is correct.
Thanks!
Your assumption is incorrect.
You could write a filter on IIS that looks at the requested URL and notes if "www.amazingproduct.com" is sent in to do a "Server.Transfer" of the request to the subfolder that would be one solution that wouldn't require a new site at all.
URL Rewrite could also be another way to configure a way around this to some degree.

Website A 'redirect' to subdomain of website B, with content of website A

There has been a question made towards me recently to do the following:
We have a website with Drupal running in IIS.
On that site is an URL Redirect to a website hosted externally, obviously with a name completely irrelevant to the name of our company.
The question now is the following;
They want to change to URL to a subdomain of our website. Example: from "www.external-site.com" to "www.sub.internal.com" (while still showing content of the external website)
They want the current page of that website to be reflected in the URL bar. So it wouldn't say "www.sub.internal.com", but it would say "www.sub.internal.com/solutions/page1.html" (instead of "www.external-site.com/solutions/page1.html")
It's possible that I forgot another 'condition' but have mentioned before this.
So, if someone visits through our URL Redirect to External-website, it needs to show our subdomain instead of their domain in the URL, AND it needs to show the current page when people start browsing while still using our subdomain in the URL.
Now, I checked the external-website, and it seems that most of the links available are relative links (if this would be any useful information).
Currently, the external website is hosted externally, and will remain to be so for next few years. (I believe we bought the company)
I have been asking around and looking up, and the best possible thing seems to use domain forwarding, but even then it still doesn't seem to comply with the entirety that they asked of me.
I am but a 'simple' .NET programmer, held responsible to do support for anything involving the websites, and I can't say I have extended knowledge about infrastructure. (But I can ask people to do this for me)
Is there anything that could solve this?
Thanks so much!
IIS's URL rewite and Application Request Routing (ARR) combo can help you what you want to achive. Here are few links which may guide you to configure ARR. Please note that these links dont exibit exact solution to your problem however you can take clue from it and fabricate your solution accordingly.
http://www.iis.net/learn/extensions/url-rewrite-module/reverse-proxy-with-url-rewrite-v2-and-application-request-routing
http://www.iis.net/learn/extensions/url-rewrite-module/reverse-proxy-rule-template
It sounds like you'll want to use a full-page iframe: do not redirect but show a page with an "inner page" instead: that inner page is the external web site. That way, users do not see the external site in their URL bar.
http://webdesign.about.com/od/iframes/a/aaiframe.htm
You need to configure the equivalent of Apache Virtual Host with Reverse Proxy on IIS.
See this answers:
https://serverfault.com/a/271030
and
https://stackoverflow.com/a/10003306/2131693

How to get Dynamic URL with the help of Web.Config and PHP

Suppose i have
3 php pages
www.example.com/page1.php?var1=data1&var2=data2&var3=data3
www.example.com/page2.php?var1=data1&var2=data2&var3=data3
www.example.com/page3.php?var1=data1&var2=data2&var3=data3
For good SEO . I need URL like
www.example.com/page1/data1-data2-data3
www.example.com/page2/data1-data2-data3
www.example.com/page3/data1-data2-data3
i need all the variables for proper functioning of php pages. Some suggests me to use htaccess file but my website is on godaddy windows hosting so htaccess doesn't work ..
.
Go Daddy allows you to use URL rewrite module if you are on windows hosting plan. You can achieve the desired effect with URL routing.
http://www.iis.net/learn/extensions/url-rewrite-module/using-the-url-rewrite-module should give you all the information you need for setting up the appropriate rewrite rule.

Resources