Joomla 4 CSS not loading with URL rewrite enabled

Discuss Search Engine Optimization in relation to Joomla! 4.x. This forum will also have discussions on SEF/SEO Joomla! 4.x extensions.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Locked
CodaM
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Wed Nov 03, 2021 1:31 am

Joomla 4 CSS not loading with URL rewrite enabled

Post by CodaM » Wed Nov 03, 2021 2:09 am

Joomla version: 4.0.3 and newest one 4.0.4 in my live server are not fully working, there are not problems when using the local server.

Description:

When the URL rewrite enabled, the URL works find for removing the index.php, but the CSS are not loaded at all.

Joomla Global Settings:
  • Search Engine friendly URLs: Yes
  • Use URL Rewrite: Yes
Joomla root settings:
  • htaccess.text to .htaccess: Yes
Live Server (Plesk)Settings:
  • Plesk with FPM application serviced by Apache, not working, than
  • Plesk with FPM application serviced by nginx, and again not work too
URL rewrite was enabled on the server as double checked with the following steps:

/* ---------- Start reference ---------- */

1. Enable SEO in your administrator:

Site -> Global Configuration -> SEO Settings: Search Engine Friendly URLs to Yes, Use URL Rewriting to Yes. (Setting Add suffix to URLs is optional).


2. Rename your htaccess.txt to .htaccess:

Next place ONLY the following lines in your .htaccess:

RewriteEngine On
Options +FollowSymLinks
RewriteRule ^joomla\.html http://www.joomla.org/? [R=303,L]

3. Now point your browser to: http://www.example.com/joomla.html

(Replace www.example.com with your own domain name in the URL above.)

If it redirects you to joomla.org then mod_rewrite is working. If it gives you an error then mod_rewrite is not working.

Note: if your site is located in a folder such as "/test/" you need to insert the code in the root .htaccess file as follows:

RewriteEngine On
Options +FollowSymLinks
RewriteRule ^test/joomla\.html http://www.joomla.org/? [R=303,L]

/* ---------- End reference ---------- */


Please if anyone can help with this would be much appreciated.

User avatar
toivo
Joomla! Master
Joomla! Master
Posts: 17426
Joined: Thu Feb 15, 2007 5:48 am
Location: Sydney, Australia

Re: Joomla 4 CSS not loading with URL rewrite enabled

Post by toivo » Wed Nov 03, 2021 4:22 am

Welcome to the Joomla forum!

More information is required. What is the URL of your website? Which template are you using? Is the styling of the back end working all right?
Toivo Talikka, Global Moderator

CodaM
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Wed Nov 03, 2021 1:31 am

Re: Joomla 4 CSS not loading with URL rewrite enabled

Post by CodaM » Wed Nov 03, 2021 5:14 am

Hi toivo,

Thanks for your response.

This is a font-end issue with the only template in the Joomla 4.x.x. There are nothing wrong with the back-end.

When the CSS is not loaded, leaving it looks like 😞.

CodaM
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Wed Nov 03, 2021 1:31 am

Re: Joomla 4 CSS not loading with URL rewrite enabled

Post by CodaM » Wed Nov 03, 2021 10:31 am

Hi toivo,

I just got a temporary fix by removing the user.min.gz.

User avatar
toivo
Joomla! Master
Joomla! Master
Posts: 17426
Joined: Thu Feb 15, 2007 5:48 am
Location: Sydney, Australia

Re: Joomla 4 CSS not loading with URL rewrite enabled

Post by toivo » Wed Nov 03, 2021 8:59 pm

Which CSS file is not loading? If you are not sure, use Developer tools (F12) in the browser and check the Network tab shows any failed downloads.

CodaM wrote:
Wed Nov 03, 2021 10:31 am
I just got a temporary fix by removing the user.min.gz.
Where exactly did you find that file? Joomla 4.0.4 does not seem to have such a file.
Toivo Talikka, Global Moderator

User avatar
toivo
Joomla! Master
Joomla! Master
Posts: 17426
Joined: Thu Feb 15, 2007 5:48 am
Location: Sydney, Australia

Re: Joomla 4 CSS not loading with URL rewrite enabled

Post by toivo » Wed Nov 03, 2021 11:40 pm

Just finished installing a new Joomla 4.0.4 website on a remote server. The SEF option is turned on and the site uses URL rewrite with .htaccess. It displays perfectly all right the blog sample data with the normal styling of Cassiopeia.

Change the level of error reporting in Global Configuration to 'Maximum', turn the Debug option on and post the error messages and stack output here for advice.

Please post the results from the Forum Post Assistant (FPA) by following the instructions at https://forumpostassistant.github.io/docs so that the configuration can be reviewed.
Toivo Talikka, Global Moderator


Locked

Return to “Search Engine Optimization (Joomla! SEO) in Joomla! 4.x”