Skip to content

[Technical Debt]: Remove unneeded .htaccess mod directives #1608

Open

Description

@objecttothis

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.

Activity

  1. objecttothis commented on Sep 18, 2017

    @objecttothis
    MemberAuthor

    also, application/helpers/sale_helper.php is empty. Is it needed or can it be deleted?

  2. daN4cat commented on Sep 18, 2017

    @daN4cat
    Collaborator

    I would say no, I would not rely on an additional redirection to fix a wrong .htaccess configuration. So please don't change that.

  3. daN4cat commented on Sep 18, 2017

    @daN4cat
    Collaborator

    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.

  4. objecttothis commented on Sep 18, 2017

    @objecttothis
    MemberAuthor

    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?"

  5. daN4cat commented on Sep 18, 2017

    @daN4cat
    Collaborator

    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.

  6. objecttothis commented on Sep 18, 2017

    @objecttothis
    MemberAuthor

    OK, can you assign this to me?

  7. added this to the 3.2.0 milestone on Sep 18, 2017
  8. daN4cat commented on Oct 14, 2017

    @daN4cat
    Collaborator

    @objecttothis can we close this?

  9. objecttothis commented on Oct 14, 2017

    @objecttothis
    MemberAuthor

    Let me take a crack at it Monday morning to combine the two elements.

  10. modified the milestones: 3.2.0, 4.0.0 on Oct 16, 2017
  11. objecttothis commented on Oct 16, 2017

    @objecttothis
    MemberAuthor

    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.

  12. daN4cat commented on Oct 21, 2017

    @daN4cat
    Collaborator

    oh good.

  13. mckaygerhard commented on Jan 19, 2018

    @mckaygerhard
  14. changed the title [-].htaccess mod no longer needed?[/-] [+][Technical Debt]: Remove unneeded .htaccess mod directives[/+] on Apr 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions