Redirect in htaccess and Joomla Redirects stop working Topic is solved

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.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Post Reply
User avatar
plopje_kabouter
Joomla! Apprentice
Joomla! Apprentice
Posts: 30
Joined: Sat Feb 14, 2009 7:54 pm
Location: Holland

Redirect in htaccess and Joomla Redirects stop working

Post by plopje_kabouter » Thu Apr 29, 2021 5:55 pm

For years I have used the htaccess to redirect some of the website URLs because of the history in Google and other websites.

Now I have made a copy (Akeeba backup) of the site before I updated to the latest Joomla 3.9.26 version, this is placed on the same server and domain, only in a separate folder (sub.domain.com instead of domain.com).

After I updated Joomla and all components to the latest version, the redirects in the htaccess stopped working and they give a 404 error page.

For example:

Code: Select all

RewriteRule ^news/this-is-a-great-article-to-show.html /subfolder/news/this-is-a-great-article-to-show [R=301,L]
does not work anymore, if I put this into the Joomla redirects component it does work again.

But for the URLs of the Hikashop components they stopped working:

Code: Select all

RewriteRule ^.*c/ctg/12-product-category-name$ /subfolder/product-category-name.html [R=301,L]
the URL: c/ctg/12-product-category-name works fine when I remove the redirect line in the htaccess file. But as soon as I add the redirect line into the htaccess file or Joomla redirects it gives an 404 error.

I clear all other redirects URLs, cleared cache but nothing seems to work.
Anyone has ideas?

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 39824
Joined: Sat Apr 05, 2008 9:58 pm

Re: Redirect in htaccess and Joomla Redirects stop working

Post by Webdongle » Sat May 01, 2021 4:36 pm

If you are accessing the backup in the sub directory then the original redirects in .htaccess are the wrong path?

Perhaps create a subdomain and point it to the folder?

Note:
It is best (where possible) to have all sites in a folder under the /www folder and point the Domain(s)/subdomain(s) to the relevant folders. Some Hosting packages don't allow that and that is when paths get complicated.
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".

User avatar
plopje_kabouter
Joomla! Apprentice
Joomla! Apprentice
Posts: 30
Joined: Sat Feb 14, 2009 7:54 pm
Location: Holland

Re: Redirect in htaccess and Joomla Redirects stop working

Post by plopje_kabouter » Wed May 05, 2021 5:37 am

Thanks, the tip worked on another way ;) I created a new subfolder in which i placed the backup, after that it worked smoothed so something went wrong with the subdomain I guess. Anyway it works again!


Post Reply

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