Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

alternative admin url -> login page without css files #20

Open
bjt1988 opened this issue Jun 6, 2015 · 7 comments
Open

alternative admin url -> login page without css files #20

bjt1988 opened this issue Jun 6, 2015 · 7 comments

Comments

@bjt1988
Copy link

bjt1988 commented Jun 6, 2015

hi,

with an alternative admin url in the local.xml file
frontName:

the loginpage http://www.example.com/admin_11_2014 try to load a versioned reset.xxx.css and a versioned boxes.xxx.css file. both are empty. the js files are loaded correct and the login is working but it looks very bad wihtout the correct css.

@peterjaap
Copy link

You also need to add the css extension to the rewrite rule;

For nginx; rewrite "^/(.*)\.(\d{10})\.(gif|png|jpg|css)$" /$1.$3 last;

@peterjaap
Copy link

But only if you have merging disabled. If you have merging enabled, don't add the '|css' part to the rewrite rule since the versioning timestamp is already included in the actual filename.

@peterjaap
Copy link

Actually, scratch my previous advice. It will cause other files not to be found.

When using nginx, use this rewrite rule to let it find the correct file;

location ^~ /skin/adminhtml/default/default/ {
    try_files $uri $uri/ @handleradminhtmlskincss;
}

location @handleradminhtmlskincss {
        rewrite "^/(.*)\.(\d{10})\.(css|js)$" /$1.$3 last;
}

Using this, you can use merging and versioning and all the CSS files will be found.

@fbrnc
Copy link
Owner

fbrnc commented Sep 9, 2015

Thanks @peterjaap! @bjt1988, does this solve your problem?

@peterjaap
Copy link

This is the .htaccess equivalent;
RewriteRule ^skin/adminhtml/default/default/(.*)\.(.*)\.(.*) /skin/adminhtml/default/default/$1\.$3

@cybersolutionsllc
Copy link

@peterjaap I've got the same issue here. Server is running Apache ...

I've tried adding your RewriteRule in .htaccess with the other rewrite rules but it doesn't seem to be doing anything..

@jg-development
Copy link

can this be added to the readme?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants