• Home
  • Get help
  • Ask a question
Last post 1 hour 28 min ago
Posts last week 110
Average response time last week 29 min
All time posts 67418
All time tickets 10424
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.

#3429 – 4.8.1.3465 - 404s and redirections

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.
Wednesday, 22 March 2017 09:30 UTC
tomaszciti
 Hi

I'm trying to redirect some 404s using sh404SEF and I have a quick question about the features.

Using 404 requests manager one can 'Redirect to a SEF URL' (no questions about it) or 'Enter a redirect URL'. Now using the latter produces "The Non-SEF Url must begin with index.php" in most of cases.

I'm trying to redirect an image not article generated by Joomla CMS and I know it used to be possible using older versions.

I know I redirected some older pages generated by our old CMS using this feature some time ago without entering non-SEF URL (these URLs did not start with index.php) or even older pdfs.

An example:

I get a 404 for 'images/image1.jpg' so I'd like to redirect it to 'images/image2.jpg' that replaced it or just decided to rename it. When I try to do that using 'Enter a redirect URL' I get "Could not save data. Error: The Non-SEF Url must begin with index.php".
Wednesday, 22 March 2017 10:04 UTC
wb_weeblr
Hi

I'm trying to redirect an image not article generated by Joomla CMS and I know it used to be possible using older versions.
You can only redirect either to an existing SEF, or enter a non-sef, which in turns will be passed transformed into a SEF automatically before being used. We do not offer any option to redirect assets (images, css, javascript), etc

I know I redirected some older pages generated by our old CMS using this feature some time ago without entering non-SEF URL (these URLs did not start with index.php) or even older pdfs.
There was a bug for a short period of time whereby the "begin with 'index.php' was not enforced", some years back.
The reason we cannot redirect to another URL (image, even another site), is that all redirects are stored as "aliases", ie we only store redirects as a redirect to a SEF. We store the non-sef, but it needs to also have a SEF, or else other parts of sh404SEF break.

We are currently working on this whole redirect thing, and will release a dedicated extension for that, hopefully within a couple of months (that's not a commitment!), that will work both with and without sh404SEF, to make the while thing much simpler and more powerful.

I get a 404 for 'images/image1.jpg' so I'd like to redirect it to 'images/image2.jpg' that replaced it or just decided to rename it.
A much, much better approach here is to find why you get such error, and fix the error. A redirect is never a good solution, especially for assets.
Such error looks very much like you have some relative links to those images, is it so?

Rgds
 
Thursday, 23 March 2017 11:32 UTC
tomaszciti
Thanks for the reply.



The reason we cannot redirect to another URL (image, even another site), is that all redirects are stored as "aliases", ie we only store redirects as a redirect to a SEF. We store the non-sef, but it needs to also have a SEF, or else other parts of sh404SEF break.



I see. I have looked under 'Aliases' and indeed the old pdfs redirects are stored there.

Shall I leave them there or recreate them manually. It doesn't seem to break anything on our site.



We are currently working on this whole redirect thing, and will release a dedicated extension for that, hopefully within a couple of months (that's not a commitment!), that will work both with and without sh404SEF, to make the while thing much simpler and more powerful.



Great. It would make things easier :-)


One more question if I may but not connected to the subject above. I just don't want to open another ticket.

How to use canonical tags is described in your article https://weeblr.com/documentation/products.sh404sef/4/going-further/sef-urls/set-canonical.html
I have also read many other articles about them. I understand the principles e.g.

https://www.xxxx.com/what-is-a-citizencard/Print - is a version of https://www.xxxx.com/what-is-a-citizencard for printing so I set a canonical URL for /what-is-a-citizencard/Print
as /what-is-a-citizencard

What confuses me a bit is that rel="canonical" is added to every page by default e.g. the above URLs have not been modified manually in sh404SEF and have rel="canonical" tags added:


...
<base href="https://www.xxxx.com/" />

or


...
<base href="https://www.xxxx.com/what-is-a-citizencard" />

May I ask why is that happening? Does it affect anything?

Thanks.




Thursday, 23 March 2017 12:19 UTC
wb_weeblr
Hi

One more question if I may but not connected to the subject above. I just don't want to open another ticket.
Please next time, do open a new ticket. It gets very confusing and hard to track for us, and for users if we happen to make this public, to serve as reference to others.

What confuses me a bit is that rel="canonical" is added to every page by default e.g. the above URLs have not been modified manually in sh404SEF and have
sh404SEF usually don't add canonicals, because it's hard to determine automatically which URLs is the "good" one, the canonical one. There are a few situations where we can do that, for instance where viewing a com_content article, where we can fairly reliably determine the correct URL. We also add it to the home page. Please note that in all cases, we remove the one added by Joomla, which is almost always wrong.

The samples you provided looks normal to me.

Rgds
 
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.