Hide Subdirectory URL in 5.6
Permalink
I am seeing this page:
http://www.concrete5.org/documentation/how-tos/developers/hide-the-...
Which looks incredibly useful, however, I am wondering if that is supported for 5.6. I see it was published before 5.6 was released, and I am noticing the mod_rewrite rules for pretty URLs has been updated. (was RewriteRule ^(.*)$ index.php/$1 [L], is now RewriteRule . index.php [L]
I did try this nonetheless, and was left with none of my theme CSS files getting loaded.
http://www.concrete5.org/documentation/how-tos/developers/hide-the-...
Which looks incredibly useful, however, I am wondering if that is supported for 5.6. I see it was published before 5.6 was released, and I am noticing the mod_rewrite rules for pretty URLs has been updated. (was RewriteRule ^(.*)$ index.php/$1 [L], is now RewriteRule . index.php [L]
I did try this nonetheless, and was left with none of my theme CSS files getting loaded.
Any update on this? Has parsePathFromRequest been moved to another file?
Found the answer on IRC via CWSpear.
Quote:"
concrete/libraries/request.php is indeed still there as of 5.6.0.2 it now extends Concrete5_Library_Request though which is in /concrete/core/libraries/request.php
I am not sure that this is why they did it, but it opens up super awesome-ness
you can now create your own /libraries/request.php file, extend Concrete5_Library_Request and only rewrite the function you want to rewrite instead of everything
so you could probably make your own request.php in /libraries/, have it extend Concrete5_Library_Request and then copy the parsePathFromRquest function from /concrete/core/libraries/request.php and change the functionality like the guide says
that way, when you upgrade, everything will get upgraded except that ONE function. it's unlikely that one function is going to change much (if at all) at this point, so you can upgrade and not have to worry about re-apply that patch
If you upgraded via the built-in upgrader:
go look in /updates/concrete5.6.0.2
that's your new "/concrete"
all the more reason having a copy in /libraries/request.php is nifty. it would override /concrete and /updates/concrete*
"
Quote:"
concrete/libraries/request.php is indeed still there as of 5.6.0.2 it now extends Concrete5_Library_Request though which is in /concrete/core/libraries/request.php
I am not sure that this is why they did it, but it opens up super awesome-ness
you can now create your own /libraries/request.php file, extend Concrete5_Library_Request and only rewrite the function you want to rewrite instead of everything
so you could probably make your own request.php in /libraries/, have it extend Concrete5_Library_Request and then copy the parsePathFromRquest function from /concrete/core/libraries/request.php and change the functionality like the guide says
that way, when you upgrade, everything will get upgraded except that ONE function. it's unlikely that one function is going to change much (if at all) at this point, so you can upgrade and not have to worry about re-apply that patch
If you upgraded via the built-in upgrader:
go look in /updates/concrete5.6.0.2
that's your new "/concrete"
all the more reason having a copy in /libraries/request.php is nifty. it would override /concrete and /updates/concrete*
"
Hi,
did you apply this as so to make this work in newer version of C5?
If so would like to see how you have done this as I am not able to do this myself.
Thanks
did you apply this as so to make this work in newer version of C5?
If so would like to see how you have done this as I am not able to do this myself.
Thanks
It does make it harder.
Here is an alternative that does not modify request.php or change your .htaccess rules, instead uses a modified index.php:
Install to a Subdirectory, Run from root (without patches or .htaccess)
http://www.concrete5.org/?cID=612245...
Here is an alternative that does not modify request.php or change your .htaccess rules, instead uses a modified index.php:
Install to a Subdirectory, Run from root (without patches or .htaccess)
http://www.concrete5.org/?cID=612245...
This link throws me to a login page.