Love Fuel?
Donate
About
Forums
Discussions
Login
FuelPHP Forums
Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Installation & Setup
I have got a problem
hewenxiang
August 2012
I put the 'Fuelphp' in subfolder 'fuel_intro' and set up the .htaccess file for rewriting in this folder. when I use Html::anchor i got the link '
http://localhost/fuel_intro/public/....'
I don't want the plublic folder display, show I try to set 'base_url' to '
http://localhost/fuel_intro/'
But there is a problem, the css and js files can not link right. '
http://localhost/fuel_intro/assets/css/bootstrap.css?1340570021'
. cause It's in the public folder. so , What should I do for this case?
Harro
August 2012
FuelPHP is designed for your public folder to be your webservers DOCROOT, so your index.php is in the root, and your code is not accessable from the outside as it is outside your docroot. If you deviate from that design, you have two rewrite challenges:
- first you will have to rewrite [url=
http://localhost/fuel_intro/..]http://localhost/fuel_intro/..[/url]
. to [url=
http://localhost/fuel_intro/public/..]http://localhost/fuel_intro/public/..[/url]
.
- then if not found you have to rewrite to index.php The first one is needed because your assets need a URL like [url=
http://localhost/fuel_intro/assets/css/..]http://localhost/fuel_intro/assets/css/..[/url]
. which does not exist. Alternatively you can move everything from the public folder one level up (so your index.php and assets folder are in "fuel_intro". Since everything is already in the DOCROOT, there is no need for the separate public folder anymore.
hewenxiang
August 2012
Tks a lot!
Add a Comment
Howdy, Stranger!
It looks like you're new here. If you want to get involved, click one of these buttons!
Sign In
Apply for Membership
Categories
All Discussions
5,088
General
↳ General
3,364
↳ Job Board
13
↳ Installation & Setup
214
Packages
↳ Oil
213
↳ Orm
700
↳ Auth
260
Development
↳ Tips and Tutorials
126
↳ Code share
145
↳ Applications
52
In this Discussion
Harro
August 2012
hewenxiang
August 2012