SEF URL problem on new site

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.
Post Reply
User avatar
LAMF
Joomla! Guru
Joomla! Guru
Posts: 761
Joined: Fri Jul 03, 2009 9:51 am

SEF URL problem on new site

Post by LAMF » Wed Nov 08, 2023 3:10 pm

Hi,
I have a new site that I have some problems with regarding setting up SEf URLS in the Global configuration.
I have set it to yes and also renamed the htaccess.txt to .htaccess in the root catalog og the site, but still it
won't work with SEF settings on.
The error is that when you click the language shifter flag when on a page the 404 error comes up.
It works just fine as long as you stay in one language but as soon as you try to shift from Swedish to English or vioce versa the 404 Error page comes up.
WHen SEF settings is off I have no issues with the site at all.
I use Nicepage as page editor.
Any suggestions are highly appreciated.

User avatar
ceford
Joomla! Hero
Joomla! Hero
Posts: 2723
Joined: Mon Feb 24, 2014 10:38 pm
Location: Edinburgh, Scotland
Contact:

Re: SEF URL problem on new site

Post by ceford » Wed Nov 08, 2023 6:25 pm

You need a menu for each language. Could that be the problem?

User avatar
LAMF
Joomla! Guru
Joomla! Guru
Posts: 761
Joined: Fri Jul 03, 2009 9:51 am

Re: SEF URL problem on new site

Post by LAMF » Wed Nov 08, 2023 8:12 pm

No I have made a menu for each language.
See page here: https://demo.duosmart.se

User avatar
LAMF
Joomla! Guru
Joomla! Guru
Posts: 761
Joined: Fri Jul 03, 2009 9:51 am

Re: SEF URL problem on new site

Post by LAMF » Wed Nov 08, 2023 8:26 pm

I have checked it out again and it is really behaving strange.
If you navigate to a certain page and shift language then it will be a 404 Error page but if you then click the same memu item again while remaining on the same language the page reloads and shows correct.
Also if you navigate till the sub page Products/Entreprenadprodukter (Swedish) and then choose one of the products there and then press the language shifter there is all of a sudden no problem.
This makes no sense...to me at least.
Any suggestions?

User avatar
ceford
Joomla! Hero
Joomla! Hero
Posts: 2723
Joined: Mon Feb 24, 2014 10:38 pm
Location: Edinburgh, Scotland
Contact:

Re: SEF URL problem on new site

Post by ceford » Wed Nov 08, 2023 10:55 pm

I have a test site with three languages and just a couple of menu items. One thing I notice is that the language switcher flags have urls with the language code immediately after the domain name, like this:

.../de/33-beitrag-de-de.html
.../fr/32-article-fr-fr.html
.../en/31-article-en-gb.html

but your links are like this:

.../en/products/contracting-products?lang=sv
.../en/products/contracting-products?lang=en

or

.../sv/produkter/entreprenadprodukter?lang=sv
.../sv/produkter/entreprenadprodukter?lang=en

So I think you need to look at your language switcher module to see what is wrong. Try a new one in the sidebar-right position for testing.

User avatar
LAMF
Joomla! Guru
Joomla! Guru
Posts: 761
Joined: Fri Jul 03, 2009 9:51 am

Re: SEF URL problem on new site

Post by LAMF » Thu Nov 09, 2023 6:39 am

Ok yes it is built into the Nicepage component so maybe I should fire another round with their support as I have built and done the translations in Nicepage. So it might not work with another language switcher module.
Buit thanks for this, I will pass it to them and see what they say.


Post Reply

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