• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.