DNS solution for someuser.com -> domain.com/some-user - redirect

Let's suppose there is a webpage where someone can create his own profile page.
His profile page is then available at
domain.com/some-user
Then, this user with profile domain.com/some-user, own his own domain
someuser.com
and he wants redirect from someuser.com -> domain.com/some-user
How can this be achieved?
I mean what DNS records must be set for someuser.com, and what web-server settings must be set on domain.com
Thanks

One possible solution is to redirect him to domain.com host, and via apache, redirect him to domain.com/some-user.
You can do it in several technologies as Java, Php, Ruby, Node, since it's a http header field (host), which you can read and do the processing that you want.
For instance, using apache configured to answer for someuser.com and .htaccess files it would be:
Redirect "/" "http://domain.com/some-user/"

Related

Used cloud-flare on a site, but an error occurs (link wrong or retired)

I am trying to point the domain www.xxx.com to www.ttio.com/tc using cloudflare to enable to the https on the site.
On GoDaddy I have changed the nameservers to cloudflare's recommended name servers
I have also gone to "Page rules" on Cloudflare and added a forwarding rule so that the above is in place.
On going to www.xxx.com however, i get the following error:
It redirects to this url: https://shortener.secureserver.net/error_404
and the error is:
Destination
Unknown
Everything's working on our side, so the link you clicked is either wrong or has been retired.
I have done everything I think I should have, so could anyone shed any light on this please?
You can't point a domain (e.g. www.xxx.com) at an URL (e.g. www.ttio.com/tc). A domain needs to be converted to an IP address by the browser.
If the web server for www.ttio.com is set to recognise www.xxx.com and serve the content from the /tc folder under www.ttio.com, just set up a CNAME for www.xxx.com pointing www.ttio.com and it will work.
If the web server for www.ttio.com doesn't know about www.xxx.com at all, you'll need to use a translation proxy. One way of doing that is using a Cloudflare worker to map the www.xxx.com/PATH URL to www.ttio.com/tc/PATH. An example of how to do this is at https://developers.cloudflare.com/workers/tutorials/configure-your-cdn/. You may also need to rewrite the HTML so that links in the pages don't point to www.ttio.com/tc. An example of how to do that is at https://developers.cloudflare.com/workers/reference/apis/html-rewriter/.

IIS Redirects - Redirecting domain without website binding

I have a bunch of domains (50+), e.g. example1.org example2.org, example3.org that I would like to redirect (301) to a single domain, examplethebest.org. Nothing is hosted on any of these domains other than examplethebest.
I've set up all the example domains in the registrar's DNS to point to the IP of my web server.
I was wondering if redirecting these is something I could achieve via rewrites in the applicationHost.config file. Or do I need to add bindings for example1 - example3.org in examplethebest's website bindings?
Just wanted to add that I understand how to do the rewrites via the web.config in examplethebest if I add bindings for the domains I want to redirect, but would rather not have loads of domain bindings - e.g. what is best practice here? Thanks!
Okay so the issue I had on this particular web server was that the default website (listening to all requests on port 80) was stopped - the other websites all had specific bindings.
At least two possible solutions for this one:
Starting the default website and adding {http_host} rewrites in there
Creating another website, make it listen to all requests on port 80 with just a web.config and putting the {http_host} rewrites in there.
We went with option 2.

Drupal IP/domain redirect

I recently redid a client's old Drupal site, in Apostrophe, and pointed their domain to the new server.
I am now trying to access the old site via IP address, but there seems to be a redirect configured to rewrite the base IP address to the domain name (72.xx.xxx.xxx to www.clientdomain.com).
Is there something configured in Drupal to rewrite the IP address? Can I change a field in the database or configuration files to prevent this?
I have ssh access to the server, and have poured over the Drupal code, settings.php, .htaccess, etc., but cannot locate this offending field. I am not familiar with Drupal, but suspect it could be an admin setting. Since the site redirects, I am unable to login to the admin backend.
Any and all insight is appreciated. Thanks for your help!
A few possibilities:
In the settings.php (sites/default/settings.php), see if there is a $base_url set. If you can see any, comment that line. You can run a drupal site without the base_url hardcoded in the settings.php
In the .htaccess look for redirects. Your safest bet is to replace it with a fresh file downloaded from http://drupal.org/project/drupal
The most likely case is that your web server is configured to redirect the IP address to the main domain.
You can also access your site at old server by explicitly setting the IP address in your hosts file. Check it for your operating system DNS resolver docs.

Subdomain redirect to subdirectory

I have a domain in which I want the subdirectory to be shown as a subdomain in the url.
I do not want it to be a subdomain because it'll cause problems with the integration of two cms's that I have.
I would like
forum.domain.com -> domain.com/forum
to redirect to there but I would also like it to keep saying forum.domain.com in the url and not change to /forum.
I do have access to the DNS zones but I am completely lost on how to do this. So far my forum.domain.com is a website by itself in which I do not want it to be.
*Server Htaccess is running helicon ape.
This cannot be done purely through DNS. It's not hard, but it does involve your web server's configuration.
In DNS, create a CNAME (an alias) for forum.domain.com to point to your server, probably domain.com.
In your webserver's configuration, configure a new virtual host with that path as its document home. The way you do this will depend on whether you use Apache, Nginx, etc.

DNS Redirecting into Another website

I own a website(A) and used blogger platform in web domain.Last month blog get deleted and i couldn't redirect it(A) into another new blog.As it is(A) domain only(No hosting), Can i redirect that domain(A) into my another website (B) which has Hosting in it(B) ??
You could change your DNS settings for your domain (of website A) to point to the IP address of your server for website B or also simply use a CNAME record which would point to your FQDN for website B, for example: www.websiteA.com CNAME www.websiteB.com.
There may be further configuration required for your host so they know to serve your website from requests to websiteA.com.
Note: This will continue to display as www.websiteA.com/page in your browser and not do a true redirect to www.websiteB.com/page.