Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8602905
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T02:12:03+00:00 2026-06-12T02:12:03+00:00

My header.php doesn’t link to default.css properly. Page loads without CSS applied. If I

  • 0

My header.php doesn’t link to default.css properly. Page loads without CSS applied.
If I view the source of the page and click on the link to .css file – 403 Forbidden shows up in Source View.

config.php

$config['base_url'] = 'http://localhost/dev/';

routes.php

$route['default_controller'] = "page/view";
$route['404_override'] = '';

pages is the controller

view is the method

application/view/templates/header.php

<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <link href="<?php echo base_url(); ?>application/css/default.css" rel="stylesheet" type="text/css" />
        <title><?php echo $title; ?></title>
    </head>
    <body>

application/css/default.css

* {margin:0;padding:0;}

body {
    background-image: url(../images/bg.gif);
    background-repeat: repeat-x;
    ...
}

application/images/

-- bg.gif GIF Image 1KB

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T02:12:04+00:00Added an answer on June 12, 2026 at 2:12 am

    Is a good practice to put css files in “assets” directory instead of “application”. Move the file to a directory called assets/css in your DOCUMENT_ROOT and change this line:

    <link href="<?php echo base_url(); ?>application/css/default.css" rel="stylesheet" type="text/css" />
    

    to:

    <link href="<?php echo base_url(); ?>assets/css/default.css" rel="stylesheet" type="text/css" />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to link a template php page (header.php) to a custom php page
PHP's curl doesn't seem to include the Host header when doing a request: <?php
I have a file called header.php that I am including on every page on
I'm using require_once() in header.php to include the FirePHP library. In the page.php I'm
I've build a drop down menu at: http://www.ourbridalsongs.com/new_header/header.php When you click on the up/down
I modified a very simple php page on my server: <?php header(Location:http://www.google.com); ?> and
I'm currently using include 'header.php' and include 'footer.php' in every page, and as far
I have a header.php and a footer.php file being included on the same page,
Here is my root folder : index.php stylesheets(folder) --->main.css includes(folder) --->header.php folder1 (folder) --->page1.php
I would include a php header ( mysite.com/header.php ) in all the pages from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.