Welcome Guest, Not a member yet? Register   Sign In
codeigniter 4 routes issue
#1

I have a problem with codeigniter 4 routing with slash of end. my project in a subdirectory, when be "/" in the end of url , redirect to root and show not fount.

Attached Files Thumbnail(s)
       
Reply
#2

It's our .htaccess doing that, but you should not run it in a folder. Create a virtual host for it.
https://github.com/codeigniter4/CodeIgni...ss#L19-L22
Reply
#3

(08-24-2020, 10:31 AM)jreklund Wrote: It's our .htaccess doing that, but you should not run it in a folder. Create a virtual host for it.
https://github.com/codeigniter4/CodeIgni...ss#L19-L22

I use two line code in htaccess like this and solved :



# Redirect Trailing Slashes...

RewriteCond %{REQUEST_URI} /+[^\.]+$

RewriteRule ^(.+[^/])$ %{REQUEST_URI}/ [R=301,L]
Reply




Theme © iAndrew 2016 - Forum software by © MyBB