Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

not webserver agnostic #105

Open
mckaygerhard opened this issue Nov 20, 2023 · 8 comments
Open

not webserver agnostic #105

mckaygerhard opened this issue Nov 20, 2023 · 8 comments

Comments

@mckaygerhard
Copy link

the app only works with rewrite rule activated that only documented for apache2 in htaccess

@kishor10d
Copy link
Owner

@mckaygerhard I will add rewrite rules for others as well (e.g. lighthttpd)

@mckaygerhard
Copy link
Author

@kishor10d there is the lighttpd rules ? why closed if there is no commit related?

@kishor10d kishor10d reopened this Dec 4, 2023
@mckaygerhard
Copy link
Author

mckaygerhard commented Dec 5, 2023

to avoid the rewrite nasty dependent you must change some ocurrences of codeigniter of site_url() to base_url()

by example to call public files and assets you must use base_url() that is the site url without the index defined (so will not be afected if you use rewrite rule or not)

for the hidden urls you must setup a site_url() with detection of the rewrite, by a flag .. this is the right way how good project like dokuwiki does!

another more elegant way could be a class/helper that detects if the site have a index,php defined or not, and return proper result from site_url() or base_url() depending of the detection.. for CEO urls

i can just started to find ways to made such change but of course only if you will also give enought support...

cos i was xpecting to use this repo as template to a future auth api .. a missing kind of artifact in codeigniter.. , currently only you can find libs like Ion auth, myth-auth or the new hyper complicated shield.. all of those are just libraires that you must code.. my project will be an API that just will be consumed and coding will be only to provide more funtionallity @kishor10d

@gstrauss
Copy link

gstrauss commented Dec 5, 2023

lighttpd config suggestion

index-file.names = ("index.html", "index.php")

server.modules += ("mod_rewrite")
$HTTP["url"] !~ "^/(?:forums|images|css|downloads|jquery|js|robots\.txt|favicon\.ico|.*\.swf)|/$" {
    url.rewrite-if-not-file = ("" => "/index.php?${url.path}${qsa}")
}

@mckaygerhard
Copy link
Author

mckaygerhard commented Dec 7, 2023

Why would @gstrauss will be interested in what "old applications" run in his project? that ultimately leaves a lot behind and has little welcome in my latest suggestions? lighttps is not used so much? hug?

$HTTP["url"] !~ "^/(?:forums|images|css|downloads|jquery|js|robots\.txt|favicon\.ico|.*\.swf)|/$" {
    url.rewrite-if-not-file = ("" => "/index.php?${url.path}${qsa}")
}

i will check this @kishor10d but just advertise that index.php depends of the defined in config.php file, must be pointed in the configuration file, so if changed still must be recodified the usage of site_url() to base_url() but i am still busy ..

@muhammadasad251
Copy link

I want to use this application on my server. I put it in my subdirectory and Logme controller is not showing anything. When I press login button

@kishor10d
Copy link
Owner

@muhammadasad251 : As per my understanding, you need to change the base url in config.php file.

@mckaygerhard
Copy link
Author

that's not true.. this web application forced to use rewrite.. making server focused and not agnostic, i already put the rule rewrite you provide it and dont workt..

advanced sistems like dockuwiki already does this whitout forced admins to use apache2 @muhammadasad251

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants