revig / revigniter

Framework for people who build websites using LiveCode
https://revigniter.com/
Apache License 2.0
28 stars 9 forks source link

_rigSetRouting does not set default routing for nested installs #8

Closed bhall2001 closed 7 years ago

bhall2001 commented 7 years ago

I've noticed for a while an unexpected behavior with the default routing when revigniter is installed in a nested directory. I assumed this was a configuration issue on my part. But it may not be.

Here's the recipe (assumes you are on localhost with a working LC server (8.1.5)/revigniter (1.9.6) setup (I am on MacOS 10.12.5))

1) install reviginiter in a directory "revigniter" within the root of the html file structure. (as an example- /var/www/html/revigniter where /var/www/html is the base of the localhost webserver)

Note: any baseURL config does not affect results below. Now using a browser...

2) Enter http://localhost/revigniter/index.lc/welcome Expected results: Revigniter's default welcome page Observed results: Revigniter's default welcome page

3) Enter http://localhost/revigniter/index.lc Expected results: Revigniter's default welcome page Observed results: Revigniter 404 page

4) Enter http://localhost/revigniter/ Expected results: Revigniter's default welcome page Observed results: Revigniter 404 page

I am submitting a Pull request with a proposed fix. It appears as though since Modules were added to Revigniter, in _rigSetRouting, a condition where the default controller and handler should be set will not be called. I've added an "else" in the conditional. After the fix, the following are my results:

5) Enter http://localhost/revigniter/index.lc/welcome Expected results: Revigniter's default welcome page Observed results: Revigniter's default welcome page

6) Enter http://localhost/revigniter/index.lc Expected results: Revigniter's default welcome page Observed results: Revigniter's default welcome page

7) Enter http://localhost/revigniter/ Expected results: Revigniter's default welcome page Observed results: Revigniter's default welcome page

HOWEVER, I would ask that more testing be done. I've verified that on my system and a couple of small sites, the fix does indeed process the default values on a nested setup but I do not have the capability to test this fix more thoroughly.

Bob

bhall2001 commented 7 years ago

Looks like it's a configuration issue on my side. I've closed the issue as it's not an issue.