- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: Apache URL Redirect
Operating System - Linux
1752782
Members
6038
Online
108789
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-14-2010 12:22 AM
тАО11-14-2010 12:22 AM
Hi,
I want to re direct the requestes which are coming to my server url to https://server/test.
It is working fine if i am giving http://server (http://server redirecting to https://server/test).This is achived by adding the following lines in httpd.conf.
RewriteEngine on
RewriteRule ^/$ https://server/test [R]
But if am giving https://server it is not rdirecting to https://server/test. How i can achive this?
Manoj K
I want to re direct the requestes which are coming to my server url to https://server/test.
It is working fine if i am giving http://server (http://server redirecting to https://server/test).This is achived by adding the following lines in httpd.conf.
RewriteEngine on
RewriteRule ^/$ https://server/test [R]
But if am giving https://server it is not rdirecting to https://server/test. How i can achive this?
Manoj K
Thanks and Regards,
Manoj K
Manoj K
Solved! Go to Solution.
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-14-2010 01:58 AM
тАО11-14-2010 01:58 AM
Solution
There are many possible ways to structure your Apache configuration file.
If the same Apache instance offers both http and https services, one possible way to configure it is to have a separate VirtualHost block for one service (either http or https), and let the main server configuration cover the other service.
Another way is to have two VirtualHost blocks, one explicitly for http and the other for https.
So you may have to add your redirect definition to another spot in your configuration to make it take effect for the HTTPS service too. But without knowing how your Apache configuration is structured, I cannot tell you exactly where to put it.
By the way, using the RewriteEngine for such a simple redirect is probably overkill. A simpler way to redirect all requests for the server's front page to https://server/test would be:
RedirectMatch ^/$ https://server/test
If someone requests e.g. http://server/foo and you'll want it automatically redirected to https://server/test/foo instead, then:
RedirectMatch ^/(.*)$ https://server/test/$1
MK
If the same Apache instance offers both http and https services, one possible way to configure it is to have a separate VirtualHost block for one service (either http or https), and let the main server configuration cover the other service.
Another way is to have two VirtualHost blocks, one explicitly for http and the other for https.
So you may have to add your redirect definition to another spot in your configuration to make it take effect for the HTTPS service too. But without knowing how your Apache configuration is structured, I cannot tell you exactly where to put it.
By the way, using the RewriteEngine for such a simple redirect is probably overkill. A simpler way to redirect all requests for the server's front page to https://server/test would be:
RedirectMatch ^/$ https://server/test
If someone requests e.g. http://server/foo and you'll want it automatically redirected to https://server/test/foo instead, then:
RedirectMatch ^/(.*)$ https://server/test/$1
MK
MK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-14-2010 04:38 AM
тАО11-14-2010 04:38 AM
Re: Apache URL Redirect
Hi Matti,
Thanks for your support.
I have append the following line in httpd.conf
RedirectMatch ^/$ https://server/test
and it is solved the issue.
Manoj K
Thanks for your support.
I have append the following line in httpd.conf
RedirectMatch ^/$ https://server/test
and it is solved the issue.
Manoj K
Thanks and Regards,
Manoj K
Manoj K
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP