This forum has been moved here:
Helicon Tech Community Forum

  Active TopicsActive Topics  Display List of Forum MembersMemberlist  HelpHelp   RegisterRegister  LoginLogin
Helicon Ape
 Helicon Tech : Helicon Ape
Subject Topic: SSL Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
Dave-W
Groupie
Groupie


Joined: 09 December 2009
Location: United Kingdom
Online Status: Offline
Posts: 43
Posted: 17 March 2010 at 9:29am | IP Logged Quote Dave-W

I have a folder I need to block access to unless the user is coming from https://Secure.DomainName.co.uk/SSL

Can this be done with Ape or would I have to use other scripting methods.

Thanks


Back to Top View Dave-W's Profile Search for other posts by Dave-W
 
Vyacheslav
Admin Group
Admin Group


Joined: 02 July 2008
Location: Ukraine
Online Status: Offline
Posts: 1542
Posted: 17 March 2010 at 10:50am | IP Logged Quote Vyacheslav

Hello,
Could you please clarify your question. What do you mean by blocking users unless they come from https://Secure.DomainName.co.uk/SSL ? Do you mean users who were on that page and then moved somewhere else? Because that requires HTTP referrer to be set, but we can�t rely on this.
Thank you for your interest in our software.

__________________
Slavik Shynkarenko,
Helicon Tech.
Back to Top View Vyacheslav's Profile Search for other posts by Vyacheslav Visit Vyacheslav's Homepage
 
Dave-W
Groupie
Groupie


Joined: 09 December 2009
Location: United Kingdom
Online Status: Offline
Posts: 43
Posted: 17 March 2010 at 11:00am | IP Logged Quote Dave-W

We have a shared SSL and we want to block all trafic unless it comes from https://Secure.DomainName.co.uk/SSL

The reason being we can still see the file if we go to http://DomainName.co.uk/SSL

Hope this is clear.

Thanks
Back to Top View Dave-W's Profile Search for other posts by Dave-W
 
Vyacheslav
Admin Group
Admin Group


Joined: 02 July 2008
Location: Ukraine
Online Status: Offline
Posts: 1542
Posted: 17 March 2010 at 11:31am | IP Logged Quote Vyacheslav

Thank you. If I understood you correct, the solution would be as follows:
Code:
RewriteEngine on
RewriteBase /
RewriteCond %{HTTPS} !on [NC,OR]
RewriteCond %{HTTP_HOST} !secure\.domainname\.co\.uk [NC,OR]
RewriteRule ^ssl.*$ - [F]


__________________
Slavik Shynkarenko,
Helicon Tech.
Back to Top View Vyacheslav's Profile Search for other posts by Vyacheslav Visit Vyacheslav's Homepage
 
Dave-W
Groupie
Groupie


Joined: 09 December 2009
Location: United Kingdom
Online Status: Offline
Posts: 43
Posted: 17 March 2010 at 12:33pm | IP Logged Quote Dave-W

is there a way to redirect it if someone tries to get in it say to error.htm

here is what we have in the rewrite file at the moment.

Code:

RewriteEngine on
RewriteBase /
RewriteMap Categories txt:Categories.txt [NC]

RewriteRule ^$ default.htm [R=301,L,NS]
RewriteRule ^default\.aspx/$ default.htm [NC,R=301,L,NS]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond ${Categories:$1|NOT_FOUND} !NOT_FOUND
RewriteRule ^([^/]+)\.htm$ Suppliers_List.aspx?pid=${Categories:$1} [NC,L,NS]

RewriteEngine on
RewriteBase /
RewriteCond %{HTTPS} !on [NC,OR]
RewriteCond %{HTTP_HOST} !secure\.DomainName\.co\.uk [NC,OR]
RewriteRule ^ssl.*$ - [F]


all we are getting at the moment is 500- internal error but the code is not working because if we go to domainname.co.uk/ssl/page.htm then it shows the page but we need it not to show. We need it to show the error page if someone goes directly to it like in the link/folder domainname.co.uk/ssl

Thanks


Edited by Dave-W - 17 March 2010 at 1:26pm
Back to Top View Dave-W's Profile Search for other posts by Dave-W
 
Vyacheslav
Admin Group
Admin Group


Joined: 02 July 2008
Location: Ukraine
Online Status: Offline
Posts: 1542
Posted: 17 March 2010 at 3:29pm | IP Logged Quote Vyacheslav

Please try the following configuration:
Code:
RewriteEngine on
RewriteBase /
RewriteMap Categories txt:Categories.txt [NC]

RewriteRule ^$ default.htm [R=301,L,NS]
RewriteRule ^default\.aspx/$ default.htm [NC,R=301,L,NS]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond ${Categories:$1|NOT_FOUND} !NOT_FOUND
RewriteRule ^([^/]+)\.htm$ Suppliers_List.aspx?pid=${Categories:$1} [NC,L,NS]

RewriteCond %{HTTPS} !on [NC,OR]
RewriteCond %{HTTP_HOST} !secure\.DomainName\.co\.uk [NC,OR]
RewriteRule ^ssl.*$ error.htm [R=301,NC]


If you get 500, please provide me with error.log because it signifies an error.
Thank you.

__________________
Slavik Shynkarenko,
Helicon Tech.
Back to Top View Vyacheslav's Profile Search for other posts by Vyacheslav Visit Vyacheslav's Homepage
 
Dave-W
Groupie
Groupie


Joined: 09 December 2009
Location: United Kingdom
Online Status: Offline
Posts: 43
Posted: 18 March 2010 at 4:43am | IP Logged Quote Dave-W

still getting 500 internal error for http://DomainName.co.uk/ssl, but can access through https:// - still getting 500 internal error and nothing in error log.
Back to Top View Dave-W's Profile Search for other posts by Dave-W
 
Vyacheslav
Admin Group
Admin Group


Joined: 02 July 2008
Location: Ukraine
Online Status: Offline
Posts: 1542
Posted: 18 March 2010 at 5:24am | IP Logged Quote Vyacheslav

Hello,
Please send to support@helicontech.com all the configuration of Ape you have, plus applicationHost.config, web.config and events log.
Thank you.

__________________
Slavik Shynkarenko,
Helicon Tech.
Back to Top View Vyacheslav's Profile Search for other posts by Vyacheslav Visit Vyacheslav's Homepage
 
Dave-W
Groupie
Groupie


Joined: 09 December 2009
Location: United Kingdom
Online Status: Offline
Posts: 43
Posted: 18 March 2010 at 10:56am | IP Logged Quote Dave-W

Email Sent
Back to Top View Dave-W's Profile Search for other posts by Dave-W
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You can vote in polls in this forum