Letractively / cfwheels

Automatically exported from code.google.com/p/cfwheels
0 stars 0 forks source link

URL Rewriting in subfolders #138

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I'm currently developing with cfwheels in a subfolder on our company server
(apache2.2) and would really like to have full URLRewriting while testing.

So I made a little patch for wheels that should allow URLRewriting
independent of where wheels is on the server. Basically, I adjusted the
test for rewriting (allowing for a little more dynamic urls) and changed
the .htaccess rules slightly

.htaccess:
 RewriteRule ^(.*)$ /rewrite.cfm/$1

changed to:
 RewriteRule ^(.*)$ /someFolderWhereWheelsResides/rewrite.cfm/$1

If it is in "someFolderWhereWheelsResides"

I haven't fully tested this, so there might be an issue with it, but it
seems to work for me.

Original issue reported on code.google.com by ralf.gru...@gmail.com on 17 Feb 2009 at 1:26

Attachments:

GoogleCodeExporter commented 9 years ago
Sounds good, not sure if I can add this to the Wheels core code though since 
the 
"someFolderWhereWheelsResides" would be application specific.

Original comment by per.djurner@gmail.com on 19 Feb 2009 at 9:23

GoogleCodeExporter commented 9 years ago
Do you think it would be worth posting in the Docs? I'm thinking it would be a 
cool
addendum to the end of the chapter on URL Rewriting.

Original comment by chrisdpe...@gmail.com on 19 Feb 2009 at 1:56

GoogleCodeExporter commented 9 years ago
For sure.

Original comment by per.djurner@gmail.com on 19 Feb 2009 at 2:42

GoogleCodeExporter commented 9 years ago
that's what I meant. 
You can add the attached diff to the core code, as it should still work with the
regular .htaccess and my modified .htaccess too.
I mean, if wheels is in the doc root, the 'Right(cgi.script_name,12) IS
"/rewrite.cfm" ' should evaluate to 'cgi.script_name', so there'd be no 
difference to
the normal wheels behaviour.

And then add some info to the wiki on how to create a modified .htaccess for 
subfolders

Original comment by ralf.gru...@gmail.com on 20 Feb 2009 at 3:10

GoogleCodeExporter commented 9 years ago
r1909.

Thanks!

Chris, can you add it to the Docs?

Original comment by per.djurner@gmail.com on 20 Feb 2009 at 5:25