• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help with .htaccess

#1
Hello guys,

I have this structure of files and folders:

Code:
framework
-- app
---- cache
---- config
---- controllers
---- models
---- ....
-- system
public
-- assets
---- css
---- js
---- ...
-- uploads
-- .htaccess (2)
.htaccess (1)


In the .htaccess nr. 1 i have:

Code:
<IfModule mod_rewrite.c>
   Options -MultiViews

RewriteEngine on

RewriteRule  ^$ public/    [L]
   RewriteRule  ((?s).*) public/$1 [L]
</IfModule>

In the .htaccess nr. 2 i have:

Code:
<IfModule mod_rewrite.c>
RewriteEngine on

RewriteCond %{REQUEST_FILENAME} !-f
   RewriteCond %{REQUEST_FILENAME} !-d
   RewriteRule ^((?s).*)$ index.php/$1 [QSA,L]
</IfModule>

The problem is:
1. When i access 127.0.0.1 it gives me CI error 404
2. When i access 127.0.0.1/public it display the welcome page

Can u help me a bit with this .htaccess files please?

Thanks.
Reply

#2
You can read up on this here:

Stupid htaccess Tricks

.htaccess tips and tricks
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply

#3
I have read both articles that u gave me and found a lot of good things there but still didn't figure out my problem...
Reply

#4
(03-07-2017, 06:03 AM)-V1cu- Wrote: I have read both articles that u gave me and found a lot of good things there but still didn't figure out my problem...

Where is your index.php file?
Reply

#5
If your index.php file is in the public folder kindly move it out of the folder and place it in the root directory.
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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