Obscure 403 error on Windows and Apache

199 views
Skip to first unread message

John Whish

unread,
May 28, 2012, 7:47:49 AM5/28/12
to framew...@googlegroups.com
Hi,

I've just run into an obscure 403 issue with subsystems when running Apache on a Windows server with SES URLs and omitting index.cfm.

It seems that (to quote):

Because the colon character is used by NTFS to denote symbolic links, when http://example.com/Special:SpecialPages is accessed, Windows looks for a non-existent symbolic link in the document root for example.com. This generates a 403 error.

Including an .htaccess file in the document root does not resolve the problem because the error occurs before the .htaccess file is parsed. To prevent the error from occurring, the colon character must be addressed in an appropriate .conf file.

The solution is to add the following to the vHosts directive in Apache:
RewriteEngine On
RewriteRule ^/(.*):(.*) /index.cfm/$1:$2
I was wondering if it is worth making the subsystem delimiter configurable ( so you could use say "~" instead of ":" ) or is this such an edge case that it's not worthwhile.

Thanks!

John

Richard Tugwell

unread,
May 28, 2012, 8:16:03 AM5/28/12
to framew...@googlegroups.com
Hi John

Subsystem delimiter is configurable in the framework. Use "subsystemDelimiter"

I've never changed the default though

Cheers
> --
> FW/1 on RIAForge: http://fw1.riaforge.org/
>
> FW/1 on github: http://github.com/seancorfield/fw1
>
> FW/1 on Google Groups: http://groups.google.com/group/framework-one



--
=================================
Richard Tugwell
http://blog.richardtugwell.com
r.tu...@forthmedia.com

John Whish

unread,
May 28, 2012, 8:52:12 AM5/28/12
to framew...@googlegroups.com
Awesome! That answers my question then :)

Looking at the processRouteMatch method it doesn't seem to use that settings - should it?

Thanks for the reply.

- John

Richard Tugwell

unread,
May 28, 2012, 9:04:49 AM5/28/12
to framew...@googlegroups.com
Hi John

I haven't used routes, or SES Urls, so I can't help I'm afraid

Sean Corfield

unread,
May 28, 2012, 1:07:48 PM5/28/12
to framew...@googlegroups.com
On Mon, May 28, 2012 at 5:52 AM, John Whish <john....@googlemail.com> wrote:
> Looking at the processRouteMatch method it doesn't seem to use that settings
> - should it?

No, routes are just a way to map SES URLs to regular URLs inside FW/1.
The parsing of subsystems is done on the regular URLs.

So if you set subsystemDelimiter to "-" and hit
http://example.com/Special-SpecialPages that will go thru the routes
machinery first and if Special-SpecialPages is left in the action, it
will become Special (subsystem) SpecialPages (section) for processing
the action.

Hope that makes sense?
--
Sean A Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/
World Singles, LLC. -- http://worldsingles.com/

"Perfection is the enemy of the good."
-- Gustave Flaubert, French realist novelist (1821-1880)

Erik Meier

unread,
May 29, 2012, 11:11:23 AM5/29/12
to framew...@googlegroups.com
John,

We ran into this issue as well for our developers on Windows.  We've moved most development to a Linux VM, but some people are still on windows.  Does your fix resolve this in all cases?  We have a hack in place to just disable the generateSES and SESOmitIndex for Windows for now.  I found that /index.cfm/subsystem:section would work with GET requests, but POST requests would fail with the same 403 error.

I don't have a Windows box to test on right now, but I'll forward this on to one of the devs who does.  It would be nice to remove the above hack.

~Erik


John

--

Ivan McAvinchey

unread,
Aug 9, 2017, 10:27:24 AM8/9/17
to framework-one, john....@googlemail.com
I ran into this issue as well (Apache on Windows)- putting the rewrite into the vHosts as John suggests rather than .htacess seems to have done the trick for me. 
Reply all
Reply to author
Forward
0 new messages