Results 1 to 18 of 18
-
02-22-2007, 10:32 AM #1Web Hosting Master
- Join Date
- Aug 2002
- Posts
- 655
Redirect domain.com/admin to https://domain.com:10000
How do i forward requests to http://www.domain.com/admin to https://www.domain.com:10000 ?
I have usermin control panel running at https port 10000, but hosted customers have trouble rememembering the port address, hence i want to provide simplified url to all hosted customer so that whenever a customer types http://domain.com/admin or http://www.domain.com/admin he is forwarded to https://www.domain.com:10000 .
I have a number of domains hosted and need a global mod_rewrite rule or whatever that can be specified once in my apache httpd.conf file and it should work for all hosted domains on my server.
-
02-22-2007, 11:31 AM #2Junior Guru Wannabe
- Join Date
- Dec 2006
- Posts
- 38
I just pasted the below in another thread, you can use it for your situation as well:
Just make a default document like index.html or default.html
<html>
<head>
<meta http-equiv="refresh" content="0; URL=http://www.domain.com:10000/">
</head>
</html>Caro.Net: Support is everything
Offering High Quality Dedicated Servers.
-
02-22-2007, 12:00 PM #3Web Hosting Master
- Join Date
- Apr 2003
- Location
- San Jose, CA.
- Posts
- 1,624
you could do that... or
put in a .htaccess file, or as you mention in your httpd.conf to have it work "globally":
Redirect /admin https://www.domain.com:1000
-
02-23-2007, 02:46 PM #4Web Hosting Master
- Join Date
- Aug 2002
- Posts
- 655
how do i do this with just one global entry in httpd.conf?
i want this to work in following manner;
- domain1.com/admin should forward to https://www.domain1.com:10000
- domain2.com/admin should forward to https://www.domain2.com:10000
-
02-23-2007, 03:04 PM #5Eternal Member
- Join Date
- Dec 2004
- Location
- New York, NY
- Posts
- 10,710
MediaLayer, LLC - www.medialayer.com Learn how we can make your website load faster, translating to better conversion rates for your business!
The pioneers of optimized web hosting, featuring LiteSpeed Web Server & SSD Storage - Celebrating 10 Years in Business
-
02-23-2007, 03:11 PM #6Junior Guru Wannabe
- Join Date
- Sep 2006
- Location
- UK
- Posts
- 61
You can also do forwards in php:
<?php
header("Location: http://domain.com:8080");
?>
I realise this will cause an infinate loop if your forwarding to the same page, just refer to it from a different page
RegardsChris Priestland
Host Centric
www.host-centric.co.uk
Host Centric is part of the JMF Group which has been provisioning web hosting since 2003
-
02-24-2007, 12:30 AM #7Web Hosting Master
- Join Date
- Oct 2004
- Location
- Kerala, India
- Posts
- 4,771
You can use mod_proxy in apache to redirect the requests coming to port 80 to port 10000
David | www.cliffsupport.com
Affordable Server Management Solutions sales AT cliffsupport DOT com
CliffWebManager | Access WHM from iPhone and Android
-
02-24-2007, 10:19 AM #8Web Hosting Master
- Join Date
- Aug 2002
- Posts
- 655
Originally Posted by david510
Instead i want to direct all requests coming on port 80 as www.domain.com/admin to secure port https://www.domain.com:10000
Can you let me know how to do this using mod_proxy?
-
02-25-2007, 07:21 AM #9Junior Guru
- Join Date
- Aug 2006
- Location
- Western Europe
- Posts
- 217
Originally Posted by hostchamp
<VirtualHost SOMEIP:80>
ServerName SOME.hostname.tld|
ProxyRequests Off
ProxyPass /admin http://localhost:10000/
ProxyPassReverse /admin http://localhost:10000/
</VirtualHost>
-
02-26-2007, 10:52 AM #10Web Hosting Master
- Join Date
- Aug 2002
- Posts
- 655
Originally Posted by Dualism
how do i do this with just one global entry in httpd.conf?
i want this to work in following manner;
- domain1.com/admin should forward to https://www.domain1.com:10000
- domain2.com/admin should forward to https://www.domain2.com:10000
I do not want to enter this for each virtualhostblock as i have lots of virtual domains.
-
02-28-2007, 11:35 AM #11Web Hosting Master
- Join Date
- Aug 2002
- Posts
- 655
anyone pls?
-
02-28-2007, 11:44 AM #12Junior Guru
- Join Date
- Aug 2006
- Location
- Western Europe
- Posts
- 217
Originally Posted by hostchamp
Are you using a control panel ? Is yes, which one, some can rewrite all files with only 2-3 shell commands.
-
02-28-2007, 02:43 PM #13Web Hosting Master
- Join Date
- Aug 2002
- Posts
- 655
i do not use any control panel, i jst use webmin
-
02-28-2007, 02:58 PM #14Junior Guru
- Join Date
- Aug 2006
- Location
- Western Europe
- Posts
- 217
Originally Posted by hostchamp
-
02-28-2007, 03:07 PM #15Junior Guru
- Join Date
- Aug 2006
- Location
- Western Europe
- Posts
- 217
I just got a little workaround solution.
Add an alias to your global httpd.conf like :
Alias /adminpanel /var/www/html/adminpanel.php
<VirtualHost 111.111.111.111:80>
ServerName www.yourspecialhostname.net
ProxyRequests Off
ProxyPass / http://localhost:10000/
ProxyPassReverse / http://localhost:10000/
</VirtualHost>
<?php
header("Location: http://www.yourspecialhostname.net");
?>
-
03-01-2007, 04:29 PM #16Web Hosting Master
- Join Date
- Aug 2002
- Posts
- 655
you got this slightly wrong, i do not want domain1.com/admin or
domain2.com/admin to forward to https://yourspecialhostname.com:10000
instead i want this to work in following manner;
- domain1.com/admin should forward to https://www.domain1.com:10000
- domain2.com/admin should forward to https://www.domain2.com:10000
basically whateverdomaincustomertypes.com/admin should be redirected to https://whateverdomaincustomertypes.com:10000
i.e. on the browser address bar the url should be https://www.customersowndomain.com:10000
-
04-23-2007, 10:48 AM #17Web Hosting Master
- Join Date
- Aug 2002
- Posts
- 655
you got this slightly wrong, i do not want domain1.com/admin or
domain2.com/admin to forward to https://yourspecialhostname.com:10000
instead i want this to work in following manner;
- domain1.com/admin should forward to https://www.domain1.com:10000
- domain2.com/admin should forward to https://www.domain2.com:10000
basically whateverdomaincustomertypes.com/admin should be redirected to https://whateverdomaincustomertypes.com:10000
i.e. on the browser address bar the url should be https://www.customersowndomain.com:10000
-
04-23-2007, 01:05 PM #18Aspiring Evangelist
- Join Date
- Nov 2003
- Posts
- 350
You have to use a rewrite rule in .htaccess file under admin/ directory, like
RewriteCond %{HTTP_HOST} (^.*$)
RewriteRule .* https://%1:10000/ [R=301]LiteSpeed Web Acceleration Platform by https://www.litespeedtech.com
Apache drop-in replacement. Triple server capacity with 10X performance increases.
Ultimate web serving platform for WordPress, Magento and other web applications.
Turbo charging all WordPress sites hosted on your server with a single click!