httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Foster, Stephen \(ASPIRE\)" <steve.fos...@hmrcaspire.com>
Subject RE: [users@httpd] re-write rules
Date Tue, 21 Nov 2006 11:58:29 GMT
Hi there,

someone posted me a potential fix for this issue in this thread, however having had mailbox
problems it has disappeared, could someone check their mailbox and see if they have the rest
of the thread.

many thanks

Steve

-----Original Message-----
From: Foster, Stephen (ASPIRE) 
Sent: 18 October 2006 14:45
To: users@httpd.apache.org
Subject: RE: [users@httpd] re-write rules


hi there, 

yes i meant HTTPS ..sorry...

Requests that do work:

a: http://your.domain.com -> re-directs to https://your.domain.com/home
b: http://your.domain.com/heartbeat/heartbeat.htm -> returns file to browser with 200 code
c: http://your.domain.com/server-status -> returns server-status to browser with 200 code
d: http://www.your.domain.com/whatever -> redirects to http because it doesn't match the
right incoming domainname and then to https://your.domain.com/whatever
e: https://your.domain.com - > gives 404
f: https://your.domain.com/ - > gives 404

does that help?

Cheers

Steve


-----Original Message-----
From: Boyle Owen [mailto:Owen.Boyle@swx.com]
Sent: 18 October 2006 14:29
To: users@httpd.apache.org
Subject: RE: [users@httpd] re-write rules


> -----Original Message-----
> From: Foster, Stephen (ASPIRE) [mailto:steve.foster@hmrcaspire.com] 
> Sent: Wednesday, October 18, 2006 3:18 PM
> To: users@httpd.apache.org
> Subject: [users@httpd] re-write rules
> 
> hi there,
> 
> i am having a slight issue with re-write rules, i have it 
> setup so that any requests that are not HTTP get re-sent to 

do you mean HTTPS ------------------------^^^^ ?

> HTTPS. However if i connect using https://your.domain.com or 
> https://your.domain.com/ i get a page not found, 

But do you have a DirectoryIndex defined for the HTTPS VH?

> so i need to 
> be able to catch that its https but that there is no request 
> and to send it to https://your.domain.com/home.
> 
> my current rules are:

These are the rules for the HTTP VH, correct?

> 
> # =================================================
> # Rewrite to HTTPS Settings
> # =================================================
> RewriteCond %{REQUEST_URI}  !=/heartbeat/heartbeat.htm
> RewriteCond %{REQUEST_URI}  !=/server-status
> RewriteCond %{SERVER_PORT}  !=443
> RewriteRule ^/$ https://your.domain.com/home [R=301,L]
> RewriteCond %{HTTP_HOST}   !^your\.domain\.com [NC]
> RewriteCond %{HTTP_HOST}   !=""
> RewriteCond %{REQUEST_URI}  !=/heartbeat/heartbeat.htm
> RewriteRule ^/(.*)  http://your.domain.com:%{SERVER_PORT}/$1 [R=301,L]
> 
> The first rules handles the fact that i have to serve 
> heartbeat.htm and server-status as port 80 requests but 
> anything else thats not HTTPS goes to HTTPS.
> The second rule matches the incoming domain request to 
> re-write to the correct domain, but allows heartbeat.htm to 
> send a 200 status code rather than a 301.

I read this three times but couldn't understand what your problem is.
Please specify:

- example input/output URLs that work
- example input/output URLs that don't work and why not.
eg

request A
get B - as expected

request C
get D - expected/want E

Rgds,
Owen Boyle
Disclaimer: Any disclaimer attached to this message may be ignored. 

> 
> Any thoughts would be greatly appreciated
> 
> cheers
> 
> Steve
> 
> Steve Foster | Capgemini | Telford
> Shared Technology Services
> T. +44 (0) 1952 296664 | www.capgemini.com
> Internal: 46664
> 
> Join the Collaborative Business Experience 
> 
> 
> ===========================================================
> Our e-mail domain has now changed from iraspire.com to 
> hmrcaspire.com. Please update your address books.
> ===========================================================
> 
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP 
> Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
 
 
This message is for the named person's use only. It may contain confidential, proprietary
or legally privileged information. No confidentiality or privilege is waived or lost by any
mistransmission. If you receive this message in error, please notify the sender urgently and
then immediately delete the message and any copies of it from your system. Please also immediately
destroy any hardcopies of the message. You must not, directly or indirectly, use, disclose,
distribute, print, or copy any part of this message if you are not the intended recipient.
The sender's company reserves the right to monitor all e-mail communications through their
networks. Any views expressed in this message are those of the individual sender, except where
the message states otherwise and the sender is authorised to state them to be the views of
the sender's company.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org



===========================================================
Our e-mail domain has now changed from iraspire.com to hmrcaspire.com. Please update your
address books.
===========================================================


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org



===========================================================
Our e-mail domain has now changed from iraspire.com to hmrcaspire.com. Please update your
address books.
===========================================================


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message