0

Ive taken a copy of expressionengine from our production server to a dev server and its installed and running. I can access the admin console fine and Ive updated my paths.

The problem is that when I try and view my site the main page loads but no CSS is downloaded. The error Im getting is

The requested URL /presentation/layout was not found on this server.

I cant access the file from http://localhost/presentation/layout but I can access from

http://localhost/index.php/presentation/layout

Ive updated my .htaccess file from the following guide

https://docs.expressionengine.com/latest/urls/remove_index.php.html

<IfModule mod_rewrite.c>
        RewriteEngine On
        RewriteBase /

        # Removes index.php from ExpressionEngine URLs
        RewriteCond %{THE_REQUEST} ^GET.*index\.php [NC]
        RewriteCond %{REQUEST_URI} !/system/.* [NC]
        RewriteRule (.*?)index\.php/*(.*) /$1$2 [R=301,NE,L]

        # Directs all EE web requests through the site index file
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteRule ^(.*)$ /index.php/$1 [L]
</IfModule>

I can access the site now from http://localhost without the index.php but its still looking for it for the CSS file. Any idea how I can resolve this?

1 Answer 1

0

First thing: don't put your css file in a template unless you absolutely have to. You only need dynamical css files if the styles are depending on the data in a channel like

{exp:channel:entries}
.{title} {
color: #{color_custom_field};
}
{/exp:channel:entries}

If you put it in a template it will be processed by the template parser on every page view. This will add extra queries/processing which isn't needed for a static file.

What version of EE are you on?

All of us EE guys are over at https://expressionengine.stackexchange.com/ by the way

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.