0
votes

My home page url is http://localhost:8080/myproj/ I need to remove the trailing slash How do I do that ?

Because, when I remove index.php(using htaccess), the url becomes http://localhost:8080/myproj//projects/list The url needs to be this way http://localhost:8080/myproj/projects/list

Please help

2
how you produce this http://localhost:8080/myproj//projects/list. show code.Rejoanul Alam
using RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [L] in htaccesssan
no, I am saying what function you used. site_url() or base_url()? provide this codeRejoanul Alam
used site_url()san
perhaps you using like this echo site_url().'/projects/list'Rejoanul Alam

2 Answers

1
votes

your code should as following

echo site_url('projects/list')

try this

0
votes

Try to use this .htaccess

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php/$0 [PT,L]

This guide should be helpful.. http://www.htaccess-guide.com/