Redirect all subsites to one site - apache

I have a website running on Apache. The address is http://helpdesk.example.com/otrs/customer.pl
I would like to create a forward such that if I access http://helpdesk.example.com/otrs/anyname (except customer.pl) this redirects to http://helpdesk.example.com/otrs/customer.pl
Also I'd like to not show the path of the website in the URL:
http://helpdesk.example.com/otrs/customer.pl displayed as http://helpdesk.example.com/
Thanks you for help!

Related

resolve URL domain with external subdomain contents

I've purchased a new domain, lets call it example.ca.
I need the above URL to resolve in the browser, with the contents of another site, in this case www.test.ca/othersite
The expected behaviour is so when a user types example.ca, the site will load the contents of the www.test.ca/othersite, while still appearing the above URL as example.ca
I am not looking for a redirect, so wondering how this can be done using DNS and apache rules. Any help is appreciated!

Redirect a specific single web page from one domain to a specific web page under another domain

How do I get the following redirect to work?
The old address contains URL parameters:
olddomain.com/Index.asp?CategoryID=2379&ArticleID=6592
And needed to redirect to a regular URL under the new domain:
newdomain.com/example-page
Can I do it via mod_rewrite on on my .htaccess file? what is the correct command for this redirection?
I will need to do that for each page under the old domain (the target URL under the new domain will be different for each page)
Actually nothing, the only solution I found was to redirect the entire domain to the new domain, without redirecting each page to it's target.

How to point one domain into another existing domain hosting?

I want to point one domain to another existing domain.
For example I have the following two domains:
test1.com
test2.com
Now suppose I have done hosting for test2.com. But now I want that if I open test1.com, that it should open the same content/pages which are displayed in test2.com. I do not want to redirect from test1.com to test2.com. URL should be same as it is i.e test1.com. Is this possible?
I have cpanel hosting.
Please add an url redirect record from your cpanel.
Record-
First domain will be forwarded to second domain.
You can just add the second domain name as parked from cPanel -> Parked domains. It will achieve what you are trying to do:
https://documentation.cpanel.net/display/ALD/Park+a+Domain
Please note however that if you are running WordPress for example, as it is a URL dependable application, it might rewrite your URL.

Website redirecting inproperly

I have the following issue, I'm building a website and it's deployed inside a subdirectory of my server, the website is a referral for sales services. Then on the homepage I have two links that references the two main categories of the products sold in it. Now the first link href's is /es/sports/ if I click on it I get a 404 error but if I copy paste the url in the browser then the page is shown correctly.
Note, when I click the link it is redirected to /sports/ instead of /es/sports/ as corresponds.
Maybe some htaccess configuration on the root of the public folder?
It's a laravel powered website.
The website url is the following. http://entrenamiento.com/es/ the links are the ones on the left sidebar.
First of all thanks for all comments and help. The thing is as follows, the parent website on the htaccess file has no support for trailing slashes after the URL. So once the trailing slash rule is enabled then the website works as expected. Thanks again

CPanel redirection addon domain

I have a wildcard subdomain setup using CPanel, and I'd like to be able to add domain that will be linked to a subdomain without the usual redirection.
So when the user go to "test1.com", I'd like him to see exactly the same as test1.mysite.com, but I want the URL in the browser to remain test1.com, test1.com/page2.html, etc..
I don't want to use Iframe.
Any solution ?
That's simple if both test1.com and test1.mysite.com are on the same cpanel account.
Click on Subdomains link in cPanel Home.
In Subdomain: field, type test1 and select mysite.com.
In the field Document Root:, type the path of the directory to which test1.com points.
Click create.
test1.mysite.com is now same as test1.com.
Hope that helps
Login to cpanel and Subdomains, in Subdomain field type your subdomain name like "demo " and choose the domain name.
In cpanel server put the Document Root: "public_html/demo"it come automatically and Click create.
And upload your files in above path public_html/demo to access your subdomain live.