问题
i'm having problem when i want to install fule php in my pc, the problem is when i'm setup .htaccess i'm get 404 page not found, i have setup modrewrite in apache it's OK.
this is my .htaccess file
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /public
RewriteRule ^(/)?$ index.php/$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>
i'm place my code in directory htdocs/myproject.
this is path of myproject directory
myproject/
.htaccess
fuel/
app/
core/
packages/
public/
assets/
index.php
oil
i don't now what happen i just following this step but i don't get the right result.
回答1:
from the link you give
In that case, you need an additional .htaccess file that you need to place in your document root, which will redirect requests to the site root to your public folder, and also modifies the rewrites to include the public folder:
so you need to have a htacess file in your myproject folder
something like this in the htaccess file
RewriteRule ^(.*)$ public/$1 [L]
回答2:
i can solve with change htaccess like this...thanks zvaya..you help me ..
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /myproject/public
RewriteRule ^(/)?$ index.php/$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>
来源:https://stackoverflow.com/questions/10809570/404-return-when-setup-htaccess-in-fuel-php