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

.htaccess problem with syntax #3778

Closed
julesbl opened this issue Oct 15, 2020 · 3 comments
Closed

.htaccess problem with syntax #3778

julesbl opened this issue Oct 15, 2020 · 3 comments

Comments

@julesbl
Copy link

julesbl commented Oct 15, 2020

On my cloudways server the current .htaccess file does not work, its a problem with later versions of apache.

Basically when I put this sort of path in /somecontroller/more_path/ it says file not found, if I use index.php in the path it works.

I made the following change

Line 33 "RewriteRule ^([\s\S]*)$ index.php/$1 [L,NC,QSA]"
Changed to "RewriteRule . ./index.php [L,NC,QSA]

The whole thing springs to life.

Version 4.04

.htaccess

Context

  • OS: Linux
  • Web server Apache, Nginx
  • PHP version 7.2
@julesbl julesbl added the bug Verified issues on the current code behavior or pull requests that will fix them label Oct 15, 2020
@paulbalandan
Copy link
Member

I am using the latest version of Apache as my manual dev server and the .htaccess works as intended. Have you tried checking if you have the right settings in httpd.conf or in your Config\App this property is set to empty string: public $indexPage = 'index.php';?

@paulbalandan paulbalandan added waiting for info Issues or pull requests that need further clarification from the author and removed bug Verified issues on the current code behavior or pull requests that will fix them labels Oct 23, 2020
@julesbl
Copy link
Author

julesbl commented Oct 24, 2020

Hi Paul
The $indexPage property is set to '', I've not got access to the http.conf file as its shared hosting, Clowdways, I had this problem before with Codeigniter 3, fortunately I remembered it and used the same fix. I was hoping to be able to give you a link to the article where I got the fix but no luck finding it.
Nginx v: 1.14.1
Apache v: 2.4.25

Basically if I change it back to the original it stops working, wish I could find where the fix came from.

Jules

@paulbalandan paulbalandan removed the waiting for info Issues or pull requests that need further clarification from the author label Oct 24, 2020
@paulbalandan
Copy link
Member

Basically, the default packaged htaccess is that which will work best with most users. As we cannot fully guarantee that this will work with all users due to limitations in server settings or with hosting providers, you are free to modify the file to tailor fit your specific needs. The current setup is what will work also on non-Latin URLs. After all, this file will not be overridden on subsequent CI updates so you can freely modify that.

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

2 participants