In a web.config, how can I incapacitate a specific page, which would be accessible for one subdomain only?
Example:
*.domain.com/tsointsoin is inaccessible all the time, for all users
test.domain.com/tsointsoin is accessible
*.domain.com/* are all accessible
Related
I have a folder with a prestashop installed hosted on OVH.
I have a domain on AWS.
I configured DNS to be able to use my domain with this hosting, but there is always a redirection when i go to my domain, to the path where my folder is located on hosting.
How can i do to keep domain url as root ?
Regenerate Prestashop .htaccess by going in "Seo & URL" menu and saving from there.
Also make sure that you shop domain and base URI are correct in the bottom section of the same page.
I need to create a cname in a domain A pointing to a domain B.
Domain B is running under IIS where I have several sites, like:
site1.com,
site2.com ...
In my cname I'm pointing to site2.com, but it is going to the IIS default page.
What do I have to do?
I try to redirect, but it doesn't work as I want the name of the domain1 on URL bar.
Thanks
By default, IIS doesn't specify domain name for default web site which mean the default website will accept incoming request with any domain names.
When you need to point domain to specific website, please remember to create a binding host header and input its hostname
https://learn.microsoft.com/en-us/iis/configuration/system.applicationhost/sites/site/bindings/binding
So if I have two domains i.e. domain1.example and domain2.example, both pointing to the exact same IP address (i.e. 192.0.2.1) on port 80.
How do I take users from domain1.example to one site, and users requesting from domain2.example to another site?
Additionally how do I set up subdomains? Someone requesting x.domain1.example should go to a third site.
When you configure the site in IIS you can assign the necessary host name in the bindings and the site will only respond to this.
I have an old Sharepoint server with the domain http://intranet.contoso.com and I want to rewrite the URL to http://intranet.contoso.eu.
So I changed the IP from my DNS entry to the new server and now, if my IIS receives a request from the .com domain, I want to rewrite this to the .eu domain and als redirect the user to this site.
I tried to achieve this with URL rewrite module in IIS, but I am failing.
Can someone explain me the correct settings for DNS and the url rewrite module, so that a user will be directed to the new site and also in his browser address bar should show up the .eu domain after the rewrite.
I am on Windows Server 2012 and IIS 8.
Added a site to the IIS with an empty directory and the same host like the old one (http://intranet.contoso.com).
Set the HTTP Redirect from this empty site to my Sharepoint site in IIS (http://intranet.contoso.eu). Set the "Redirect all requests to exact destination (instead of relative to destination) checkbox.
Changed DNS from old server to the new one.
you need to change the url on sharepoint central administration under alternate access mappings and on the iis under edit bindings
I am using multiple domains to access liferay portal instance.
For example following are the domains mapped in hosts file of windows:
www.liferaytest1.com
www.liferaytest2.com
and in Liferay's Control Panel → Portal Settings, www.liferaytest1.com is set as virtual host.
I can access portal instance with all above mention domains along with localhost.
When I access portal with www.liferaytest1.com then I can access Guest site pages directly. Say, home is a page in Guest site then instead of accessing with www.liferatest1.com/web/guest/home I can access it directly with www.liferaytest1.com/home
So URL is shortened to some extend.
So far so good.
First Concern
Now when I try to access portal via www.liferaytest2.com and when I click any sites listed in My Sites portlet of Liferay, it redirects me to that site with the domain mentioned in virtual host i.e. www.liferaytest1.com instead of retaining www.liferaytest2.com.
Suppose I have a Site named Help, so when I click on help site link in My Sites portlet then instead of staying with www.liferaytest2.com domain it redirects me with www.liferaytest1.com domain.
This is due to virtual host mapping done in liferay.
Second Concern
When I am accessing the portal with www.liferaytest2.com and subscribe to any of the Assets then the links in email contain the virtual host domain i.e www.liferaytest1.com.
How to overcome above mention issues?
My requirement is to stay relative to the portal accessing domain.
When I access portal via www.liferaytest2.com then it should not redirect me to www.liferaytest1.com on-click of any of the Site-links as explained above and also emails that I would be getting should also be relative to the domain I am accessing i.e. www.liferaytest2.com.
First of all: You're not required to use that feature - it's implemented in a certain way (e.g. as you describe) and if that doesn't suit your needs, there's no need to configure individual virtual hosts. There's no problem serving all content through just a single virtual host or do the resolution on Apache (e.g.) - that is, fully external to Liferay. The only drawback is that you'll need the clue of the site you want to access (e.g. /web/guest as part of the URL) so that Liferay knows what content to serve.
However, you might be closer to what you'd like to achieve if you change URLs to a structure like test1.example.com and test2.example.com - this way you share at least the toplevel domain and might be able to do some cheaper single-sign-on (you can still do SSO with completely different domains)
You don't need to change the virtual host in Control Panel → Portal Setting for such requirement. Rather keep it to localhost. This will resolve both of your concerns.
Next you want to access portal using two different domain, you can do it through DNS settings. Map both to same IP (the IP of Liferay portal) and you will reach Liferay portal using any one. It will not change the url and will stay from the name initiated.