• Home
  • Get help
  • Ask a question
Last post 21 min ago
Posts last week 89
Average response time last week 30 min
All time posts 67739
All time tickets 10468
All time avg. posts per day 21

Helpdesk is open from Monday through Friday CET

Please create an (free) account to post any question in the support area.
Please check the development versions area. Look at the changelog, maybe your specific problem has been resolved already!
All tickets are private and they cannot be viewed by anyone. We have made public only a few tickets that we found helpful, after removing private information from them.

#4405 – Remove Sufix to old URLs

Posted in ‘sh404SEF’
This is a public ticket. Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.
Sunday, 10 December 2017 18:23 UTC
tecnoseguro
Hello Guys,
I have removed the .html sufix in the configuration of sh404sef and disabled the Sufix in the Global configuration.
It is working well, the new pages are created without sufix.

But how can I do a redirect to the old URLs that have the .html sufix? How can I do a massive 301 redirect from the .html URL to the the new URL without .html

Thanks! 
Monday, 11 December 2017 08:50 UTC
wb_weeblr
Hi

But how can I do a redirect to the old URLs that have the .html sufix? How can I do a massive 301 redirect from the .html URL to the the new URL without .html
Not sure I understand what you mean. If only newly created URLs do not have html suffixes, then what do you want to redirect to? You cannot redirect /old-url.html to /old-url, because /old-url does not exist in sh404SEF database. Am I missing something?

If my remark is not applicable, generic redirects are done with aliases, as described in the documentation on this page.

Rgds
 
Monday, 11 December 2017 14:04 UTC
tecnoseguro
Thanks for your soon answer.

Basically the new content is creating URLs that are working fine without the suffix .html
The old URLs still have the .html suffix. So... the site has a mix with old URLs with suffix and the new content without suffix, Is it possible to remove massively the .html suffix from the previous URLs and do a redirect from suffix URLs to URLs without suffix?

What I am trying to do is normalize the structure of the entire site without suffix.
Monday, 11 December 2017 14:14 UTC
wb_weeblr
Hi

There is no facility inside of sh404SEF to globally modify existing URLs. So you cannot remove ".html" from existing URLs. You can do a global redirect as mentioned before, but there would not be anything to redirect to for the old URLs, that only exist in the database as xxxx.html.

You can:

1 - Delete all those old URLs. They will be recreated as they are needed by Joomla to be displayed on a page (ie: a URL is created automatically when Joomla needs that link to be displayed in a page). This might lead to some 404s, for instance if Google wants to check back on a specific page that has not been re-created yet. Again, URLs will not be re-created when a user or google wants to visit say /some-old-page.html, but when a page on your site has a link to /index.php?option=com_content&view=article&id=12&Itemid=34. Joomla wil see this internal link, and turn it into a SEF. This is when sh404SEF will turn that non-sef URL into its SEF equivalent, ie the new version /som-old-page

2 - You can directly modify the URLs inside the sh404SEF database, in the #__sh404sef_urls table, programmatically. Be sure to disable the "Use URL disk cache" feature (it's off by default) under the "Advanced" tab of sh404SEF before doing that, otherwise your changes in the database won't be effective as older URLs are still in the cache.

Personally, I would not do anything. Old links are fine with their .html suffix, and if they are well indexed, there's really no gain into changing them now.

Rgds
 
Monday, 11 December 2017 14:37 UTC
tecnoseguro
Thanks!
I will do nothing so!
This ticket is closed, therefore read-only. You can no longer reply to it. If you need to provide more information, please open a new ticket and mention this ticket's number.