Discussion:
LiveCode server with revIgniter - new controller pages get 404 errors?
Keith Clarke via use-livecode
2018-11-27 19:02:05 UTC
Permalink
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
Keith Clarke via use-livecode
2018-11-28 10:03:30 UTC
Permalink
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
Post by Keith Clarke via use-livecode
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
Ralf Bitter via use-livecode
2018-11-28 12:05:01 UTC
Permalink
Hi Keith,

sorry for responding late. Glad you found
the source of the issue, and thanks for the
suggestion to improve the docs, changed
the user guide accordingly.


Thanks again

Ralf
Post by Keith Clarke via use-livecode
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
Post by Keith Clarke via use-livecode
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
_______________________________________________
use-livecode mailing list
http://lists.runrev.com/mailman/listinfo/use-livecode
Keith Clarke via use-livecode
2018-11-28 12:25:34 UTC
Permalink
No worries, Ralf. Thanks for your response and your efforts with revIgniter - I’m very impressed with what I’ve discovered (& learned) so far! :-)
Best,
Keith
Post by Ralf Bitter via use-livecode
Hi Keith,
sorry for responding late. Glad you found
the source of the issue, and thanks for the
suggestion to improve the docs, changed
the user guide accordingly.
Thanks again
Ralf
Post by Keith Clarke via use-livecode
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
Post by Keith Clarke via use-livecode
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
_______________________________________________
use-livecode mailing list
http://lists.runrev.com/mailman/listinfo/use-livecode
_______________________________________________
use-livecode mailing list
http://lists.runrev.com/mailman/listinfo/use-livecode
Loading...