You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Technical Debt]: Remove unneeded .htaccess mod directives #1608
Currently, the /public/.htaccess file has the section that reads:
# if in subdir comment above line, uncomment below one and replace <OSPOS path> with your path # RewriteRule ^(.*)$ /<OSPOS path>/public/index.php?/$1 [L]
I went to rework this so that it didn't matter if you were in a subdirectory or a webroot directory and it appears that the code is obsolete. I'm guessing that with my changes to the .htaccess file in the root to redirect to the public folder, it makes this change unnecessary. I tested two different instances (both in subdirectories) without the code above enabled using the latest bintray and it worked super. If, someone can confirm that this is not needed on their instance (that resides in a subdirectory) then I will submit a pull request to just remove the code.
Yes sale_helper.php is empty but I never removed it because we might need it in some refactoring exercise. That's not an urgent thing to sort out in my opinion.
OK, that's fine. I would like to rework the /public/.htaccess so that the mod_rewrite accounts for both builds in the webroot and in subdirectories. This would prevent users from needing to modify the .htaccess depending on where their build is stored. I think I would just modify it so that it pulled the build location from the request URI dynamically. This also reduces support requests that are along the lines of "it's not working, I'm in a subdirectory, what do I do?"
Yes, if there is a smart way to do that please go ahead. I followed what was there.
Also bear in mind that the trick hides the index.php from the URL and etc.
Activity
objecttothis commentedon Sep 18, 2017
also, application/helpers/sale_helper.php is empty. Is it needed or can it be deleted?
daN4cat commentedon Sep 18, 2017
I would say no, I would not rely on an additional redirection to fix a wrong .htaccess configuration. So please don't change that.
daN4cat commentedon Sep 18, 2017
Yes sale_helper.php is empty but I never removed it because we might need it in some refactoring exercise. That's not an urgent thing to sort out in my opinion.
objecttothis commentedon Sep 18, 2017
OK, that's fine. I would like to rework the /public/.htaccess so that the mod_rewrite accounts for both builds in the webroot and in subdirectories. This would prevent users from needing to modify the .htaccess depending on where their build is stored. I think I would just modify it so that it pulled the build location from the request URI dynamically. This also reduces support requests that are along the lines of "it's not working, I'm in a subdirectory, what do I do?"
daN4cat commentedon Sep 18, 2017
Yes, if there is a smart way to do that please go ahead. I followed what was there.
Also bear in mind that the trick hides the index.php from the URL and etc.
objecttothis commentedon Sep 18, 2017
OK, can you assign this to me?
daN4cat commentedon Oct 14, 2017
@objecttothis can we close this?
objecttothis commentedon Oct 14, 2017
Let me take a crack at it Monday morning to combine the two elements.
objecttothis commentedon Oct 16, 2017
Since I am going on sabbatical, I am going to punt this to 4.0.0. It's not that involved of a mod, but I need to triage the more important things.
daN4cat commentedon Oct 21, 2017
oh good.
mckaygerhard commentedon Jan 19, 2018
[-].htaccess mod no longer needed?[/-][+][Technical Debt]: Remove unneeded .htaccess mod directives[/+]