Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
links or refs in html code is automaticaly prefixed with the URI
  • Hi,

    In my views, all the css, js, img are prefixed with the URI (i.e. : http://localhost/) when views are displayed in the navigator. In code source, I put something like this :

    <link href="assets/css/font-awesome.css" rel="stylesheet" />

    In navigator debug, I have errors 404 with a URL request "http://localhost/assets/css/font-awesome.css"

    I don't want that. I want the resources to be searched from the directory where the php file is because fuelPHP directory are beside the www directory, not inside.

    How can I fix it ?

    Thanks for your answers !
  • Don't use relative URL's, your browser prefixes it because of the missing leading /. 

    Nothing to do with Fuel.

    You can't have it searched from the directory where the php file is, php files in Fuel are all outside the document root, for security purposes. Assets should be in /public, not anywhere else.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion