ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Safecracker 2.0 on EE v2.1.3 Build: 20110411 -- Where are the styles?????

May 19, 2011 1:23pm

Subscribe [4]
  • #1 / May 19, 2011 1:23pm

    a la mode

    168 posts

    This question may be related to a resolved thread.

    I have tried the same as in the related post, but I don’t see any of the styles at all.

    I am using :

    <link href="{path='css/_ee_saef_css'}" type="text/css" rel="stylesheet" media="screen" />

    but I continue to get:

    GET <a href="http://www.mydomain.com/css/_ee_saef_css">http://www.mydomain.com/css/_ee_saef_css</a> 404 (Not Found)

    The site is sitting behind a firewall, but I don’t know why that would be an issue. It is not live yet. All testing for all sites runs this way.

    When i try to hit:

    <a href="http://www.mydomain.com/css/_ee_saef_css">http://www.mydomain.com/css/_ee_saef_css</a>

    I just get a standard 404 not found. (see pic)

  • #2 / May 19, 2011 2:24pm

    a la mode

    168 posts

    Okay…

    I don’t know if this helps or not, but I am also using MSM and my sites are in folders outside of the main install where the system files are. They are, however on the same server and directly adjacent to each other.

    So laterally, my folder structure looks something like:

    F1 = System install folder : System Files
    F2 = Site1
    F3 = Site2
    etc.etc.

    The only way I have gotten the styles to link is to hard code the URL into the link.

    Does NOT work:

    <link href="{path='css/_ee_saef_css'}" type="text/css" rel="stylesheet" media="screen" />


    Works:

    <link href="http://System_install_folder/System_Files/index.php/css/_ee_saef_css" type="text/css" rel="stylesheet" media="screen" />


    This doesn’t seem right at all though. Why do I have to reference it this way?

    Thanks in advance…

  • #3 / May 20, 2011 6:48am

    John Henry Donovan

    12339 posts

    Hi Brian,

    are you using a htaccess to remove index.php?

    When i try to hit:

    <a href="http://www.mydomain.com/css/_ee_saef_css">http://www.mydomain.com/css/_ee_saef_css</a>

    I just get a standard 404 not found. (see pic)

    What happens when you visit here

    <a href="http://www.mydomain.com/index.php/css/_ee_saef_css">http://www.mydomain.com/index.php/css/_ee_saef_css</a>

    If that works then add this to your template to test

    <link href="/index.php/css/_ee_saef_css" type="text/css" rel="stylesheet" media="screen" />
  • #4 / May 20, 2011 11:53am

    a la mode

    168 posts

    Hi John. Thanks.

    No .htaccess as this is a Windows environment. (Hence the error page in the screen that was attached) I am removing the index.php through the web.config file though using:

    <rule name="Rewrite EE Index">
      <match url=".*" >
      <conditions>
        <add input="{REQUEST_FILENAME}" pattern="css|js|jpg|jpeg|png|gif|ico|htm|html" negate="true" >
      </conditions>
      <action type="Rewrite" url="index.php/{R:0}" >
    </rule>

    Similar to other posts that you have been involved with of mine, when i try to enter:

    <a href="http://www.mydomain.com/index.php/css/_ee_saef_css">http://www.mydomain.com/index.php/css/_ee_saef_css</a>

    I just get a blank page like the “default” template for that site.

    The only way I can access the css is directly with:

    <link href="http://MySystemFolder/system/index.php/css/_ee_saef_css" type="text/css" rel="stylesheet" media="screen" />

    Very odd behavior…

  • #5 / May 22, 2011 6:48am

    Greg Salt

    3988 posts

    Hi Brian,

    Do your other templates work properly with the index.php removal? Can you temporarily disable the web.config and then test this again please?

    Cheers

    Greg

  • #6 / May 23, 2011 11:27am

    a la mode

    168 posts

    Greg,

    Thanks for the info. Yes, everything else seemed to be working fine. I went back to the original web.config though and it did work.

    So…...

    Does anyone have any input on how to remove the index.php from the url on a windows install without affecting the other functionality?

    Thanks again,

  • #7 / May 23, 2011 11:54am

    a la mode

    168 posts

    OK, I think I got it rolling with the following…

    (I am always up for suggestions in improvement though)

    <?xml version="1.0" encoding="UTF-8"?>
    <configuration>
        <system.webServer>
            <rewrite>
                <rules>
                    <rule name="Imported Rule 1" stopProcessing="true">
                        <match url="^site/?(.*)$" ignoreCase="false" >
                        <conditions logicalGrouping="MatchAll">
                            <add input="{THE_REQUEST}" pattern="^POST" ignoreCase="false" negate="true" >
                        </conditions>
                        <action type="Redirect" url="/{R:1}" redirectType="Permanent" >
                    </rule>
                    <rule name="Imported Rule 2" stopProcessing="true">
                        <match url="^(.*)$" ignoreCase="false" >
                        <conditions logicalGrouping="MatchAll">
                            <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" >
                        </conditions>
                        <action type="Rewrite" url="/index.php/{R:1}" >
                    </rule>
                </rules>
            </rewrite>
        </system.webServer>
    </configuration>


    Thanks,

  • #8 / May 23, 2011 12:02pm

    Sue Crocker

    26054 posts

    Hi, Brian.

    We don’t offer any direct support for removing index.php, but we’re glad you found a solution. You might want to consider adding this to the [url=http://expressionengine.com/wiki/EE Wiki[/url] so this doesn’t get lost whenever anyone has a similar question.

  • #9 / May 23, 2011 12:52pm

    a la mode

    168 posts

    Sue: Done. I’m hoping this helps with the other issues I was having as well.  😉

    Thanks everyone.

  • #10 / May 23, 2011 1:31pm

    Sue Crocker

    26054 posts

    Looks good, Brian! Thanks for adding the wiki entry.

    Also closing the thread.. If anything else comes up, please do let us know in a new thread..

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases