How to change SEF URL suffix .html to php

Discuss Search Engine Optimization in relation to Joomla! 3.x. This forum will also have discussions on SEF/SEO Joomla! 3.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.
Post Reply
Firewall
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Wed Feb 13, 2019 11:52 am

How to change SEF URL suffix .html to php

Post by Firewall » Wed Feb 13, 2019 12:07 pm

Hello,


Can not use the search function,right now, but have also seen no solution


I "need" to change the suffix from .html to .php , because I don't want to use "redirects".


In earlier versions i was able to edit the "site.php" or route.php of the Joomla-Core. Now I found some function in methods.php, but wasn't able to fix that.

Maybe someone can help me.
With plugins I can change the menu-extension but can't reach the article.

thx

I am using the latest 3, Joomla-Version and nginx
Last edited by toivo on Wed Feb 13, 2019 12:11 pm, edited 1 time in total.
Reason: mod note: retitled

waarnemer
Joomla! Hero
Joomla! Hero
Posts: 2204
Joined: Sun May 04, 2008 12:37 pm

Re: How to change SEF URL suffix .html to php

Post by waarnemer » Wed Feb 13, 2019 6:43 pm

First, from .html to .php, simply put, you shouldn't. html is what is web page... .php is the rendering script for that page. And it has nothing to do with redirects.
You probably mean SEO/SEF rewrites. If you don't want that, turn it off in the settings (and see what nginx documents about rewrites as the default is apache).

Second, you should never edit on joomla core .php files. Use extensions and templates to change design, look, intelligence and behaviour.
For design, look and some behaviour, you can make overrides in the templates section.
For the intelligence and other behaviour, there is the extensions...

Firewall
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Wed Feb 13, 2019 11:52 am

Re: How to change SEF URL suffix .html to php

Post by Firewall » Thu Feb 14, 2019 8:07 am

My current website is a .php Site. So I have to set a lot of new links and redirects.
Don't want to lose some of my backlinkcredits. So I just need to set a new SEF Suffix to .php.


Can you recommend an extension? I tried some, but without success. For example. Route 66 , Seo-Boss.

User avatar
geof
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 173
Joined: Thu Nov 16, 2006 6:10 am
Location: Greece, Larissa
Contact:

Re: How to change SEF URL suffix .html to php

Post by geof » Thu Feb 14, 2019 8:44 am

Yiorgos Fakas : https://volunteers.joomla.org/joomlers/ ... rgos-fakas
Professional Joomla Services in Greece https://www.easylogic.gr

waarnemer
Joomla! Hero
Joomla! Hero
Posts: 2204
Joined: Sun May 04, 2008 12:37 pm

Re: How to change SEF URL suffix .html to php

Post by waarnemer » Thu Feb 14, 2019 9:42 am

which is tempering with the core...

but from the link from @geof... do it the other way around.. direct all current backlinks to your site having .php to direct to .html..

Code: Select all

RedirectMatch 301 (.*)\.php$ http://www.[your-joomla-website].com$1.html
this way keeping standards...

Firewall
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Wed Feb 13, 2019 11:52 am

Re: How to change SEF URL suffix .html to php

Post by Firewall » Thu Feb 14, 2019 1:01 pm

@geof thx but since 3,4+ (new Routing) it doesn't work anymore.
Tha @ all

waarnemer
Joomla! Hero
Joomla! Hero
Posts: 2204
Joined: Sun May 04, 2008 12:37 pm

Re: How to change SEF URL suffix .html to php

Post by waarnemer » Thu Feb 14, 2019 1:03 pm

the reverse redirect may still work


Post Reply

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