LiveCode server with revIgniter - new controller pages get 404 errors?

Keith Clarke keith.clarke at me.com
Wed Nov 28 05:03:30 EST 2018


Fixed shared for future reference…. 

This issue was down to me missing the need for a required change to system/application/config/config.lc when using .htaccess to hide the index.lc page from the URIs structure.

This setting is clearly documented within the config.lc file, in the 'Index file'... "If you are using mod_rewrite to remove the page set this variable so that it is blank." i.e. 'put empty into gConfig["indexPage”]' ). The config.lc file is also mentioned specifically in the user guide section on ‘revIgniter URIs: Removing the index.lc file’ https://revigniter.com/userGuide/general/urls.html However, the cross-reference is for other use cases and their troubleshooting - there’s no specific mention of the change required when seeking to hide the index page with the example .htaccess file.

Ideally, this use case of the (excellent) docs could be extended slightly to close this gap, along the following lines...

"In the above example, any HTTP request other than those for index.lc, images, assets, robots.txt, css and js is treated as a request for your index.lc file. If you use this method to remove the page, set the Index file variable in your application/config/config.lc file so that it is blank."

Best,
Keith

> On 27 Nov 2018, at 19:02, Keith Clarke <keith.clarke at me.com> wrote:
> 
> Folks,
> Can anyone using LC Server with revIgniter share any tips on why new controller pages might throw 404 errors, even if they contains the content from the (working) welcome.lc controller or blog.lc example from the revIgniter docs…? https://revigniter.com/userGuide/general/controllers.html
> 
> My new (as in newbie) setup is sitting on an add-on domain on my on-rev account. The index.lc page worked, so I implemented the default .htaccess file to hide the index.lc page.
> 
> This works as expected - I get the expected welcome.lc view page content whether I navigate to 'https://domain’ or ‘https://domain/index.lc’ 
> 
> However, I  get 404 errors at 'https://domain/blog’ & ‘https://domain/index.lc/blog’ (with or without trailing slash or ‘.lc’ suffix) when working through the doc examples.
> 
> It seems to be just the new files that are causing issues but file permissions look OK at 0644 - the same as the working pages.
> 
> Thanks
> Keith





More information about the use-livecode mailing list