| Author |
|
Dave-W Groupie

Joined: 09 December 2009 Location: United Kingdom
Online Status: Offline Posts: 43
|
| Posted: 17 March 2010 at 9:29am | IP Logged
|
|
|
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 |
|
| |
Vyacheslav Admin Group

Joined: 02 July 2008 Location: Ukraine
Online Status: Offline Posts: 1542
|
| Posted: 17 March 2010 at 10:50am | IP Logged
|
|
|
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 |
|
| |
Dave-W Groupie

Joined: 09 December 2009 Location: United Kingdom
Online Status: Offline Posts: 43
|
| Posted: 17 March 2010 at 11:00am | IP Logged
|
|
|
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 |
|
| |
Vyacheslav Admin Group

Joined: 02 July 2008 Location: Ukraine
Online Status: Offline Posts: 1542
|
| Posted: 17 March 2010 at 11:31am | IP Logged
|
|
|
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 |
|
| |
Dave-W Groupie

Joined: 09 December 2009 Location: United Kingdom
Online Status: Offline Posts: 43
|
| Posted: 17 March 2010 at 12:33pm | IP Logged
|
|
|
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 |
|
| |
Vyacheslav Admin Group

Joined: 02 July 2008 Location: Ukraine
Online Status: Offline Posts: 1542
|
| Posted: 17 March 2010 at 3:29pm | IP Logged
|
|
|
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 |
|
| |
Dave-W Groupie

Joined: 09 December 2009 Location: United Kingdom
Online Status: Offline Posts: 43
|
| Posted: 18 March 2010 at 4:43am | IP Logged
|
|
|
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 |
|
| |
Vyacheslav Admin Group

Joined: 02 July 2008 Location: Ukraine
Online Status: Offline Posts: 1542
|
| Posted: 18 March 2010 at 5:24am | IP Logged
|
|
|
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 |
|
| |
Dave-W Groupie

Joined: 09 December 2009 Location: United Kingdom
Online Status: Offline Posts: 43
|
| Posted: 18 March 2010 at 10:56am | IP Logged
|
|
|
Email Sent
|
| Back to Top |
|
| |