• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • Support for BIND DNS has been removed from Plesk for Windows due to security and maintenance risks.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS.

Admin server redirect

D

DCNet_James

Guest
Does anyone have a quick fix for this.

I want to be able to setup either one of the following scenarios:

1. User puts in www.theirdomain.com/admin which redirects to https://www.theirdomain.com:8443/

2. User puts in admin.theirdomain.com which redirects to the same as above.

If anyone has a quick Apache config for this, let me know.

Thanks
James
 
You can put a redirect to handle the first one
If you add this to your .htaccess file. Or if you don't have one create it in /httpdocs/.htaccess

redirect /admin https://www.theirdomain.com:8443

You could also use an html meta tag redirect to do this if you create a directory named /admin and modify the code below. You could also put a subdomain in and replace the index.html with the code below. This would solve both of the problems.



<html>
<head>
<title>Redirect to the right page</title>
<META
http-equiv="refresh" content="5;URL=https://www.theirdomain.com:8443">
</head>

<body bgcolor="#ffffff">

<center>You will be redirected to the class materials page automatically
in 5 seconds.

Please bookmark the correct page
at <a href="http://www.indiana.edu/~smithclas/l200/">
http://www.indiana.edu/~smithclas/l200/</a>

</center>
</body>
</html>

If you want to automate the task it might be a bit more difficult. You could certainly add the /admin/index.html easily to the skeleton.
 
I know I could use a meta refresh from an HTML file.

That unfortunately is not what I was asking. I was asking something much more complicated which is already done in PSA for instance, lists.* or webmail.*. I could copy this config, but they're located in a dynamically updated include to httpd.conf.

I was going to write my own custom config and include it in the main httpd.conf.

So again, I ask the Apache people out there if they already have a quick config together.

TIA
J
 
Back
Top