When I run CI project in the browser, using localhost/hr, it redirects me to localhost/dashboard/.
Searched different solutions but didn't get it working. here is my .htaccess file in "htdocs/hr" folder
RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]
Note: There is no .htaccess file in htdocs folder.
When i remove/rename index.php file and access to htdocs it gives me error.
Object not found!
The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again.
What am i doing wrong, how to get it working?
Screenshot of my htdocs/hr folder is bellow
You need to set RewriteBase
in your .htaccess
file in your folder, which is in your case ci
.
So you would currently have
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
You should change it to
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /ci/
And that's it. It will work now.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With