Welcome Guest, Not a member yet? Register   Sign In
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

(This post was last modified: 03-07-2017, 07:00 AM by koficypher.)

(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




Theme © iAndrew 2016 - Forum software by © MyBB