XF 1.5 Problem XF 1.5 URL Attachments

subxus

Member
Hello,

I have a problem with attachments in posts.

I would like URL of the attachment to be the actual one that ends with the name of the attached file, example .... pippo.jpg

Now all attachments lead to a new page that contains only the attachment.
Is there any way to solve this problem on all forum attachments?
Thank you
 
Last edited:
I would like URl of the attachment to be the actual one that ends with the name of the attached file, example .... pippo.jpg
The short answer to this is that it would require custom development.

The URLs to attachments do work as is (and expose all of the correct headers), so unless you have a very specific need for the extension to be maintained, the existing URLs shouldn't cause problems.
 
Thanks for the reply,
if you leave the attachments visible to everyone, google indexes thousands of pages, one for each attachment, but in reality that page contains nothing, a picture without url. Thousands of pages indexed unnecessarily
would there be an add-ons also paid to solve the problem?
Thanks for the help
 
I'm afraid I don't understand what you're asking. Google will potentially index images regardless of the URL -- it's even more likely to index them if it ends in ".jpg". Their image search is based around this.

You may just be finding that Google has added pages for the index that are yet to be crawled fully, which means they may change over time.

If you really want to change this, then you may be able to match specific URL patterns and add an X-Robots-Tag header, though this would be done in .htaccess/your web server, so it's mostly out of the scope of XF.
 
Hello, I'm sorry if I insist, maybe I explained myself badly.

Google Search Console tells me several miles of Soft 404 errors, because of the attachments that return 200 by pretending to be a web page and not a simple attachment (eg attachment.jpg).

step to the questions

Does xenphorus version 2 solve this problem? you have an add-on in version 2 that solves the problem.

In case there were no chance, who can give me a quote for the custom script that solves the problem?

Thank you for your patience and great availability
 
Can you give an example of a URL in question?

We either serve the attachment content itself, which means a soft 404 is a totally incorrect interpretation. (Note that "soft 404" is simply Google guessing at something to make you aware. It's not always right.) Or we serve a no permission/login page which isn't served with a 200 response.

2.0 works the same way.

(I didn't mention, though you can also use robots.txt to change what robots will crawl on your site.)
 
if the attachments of a forum are available to all, without restrictions, then all the URLs of the attachments will end up in soft 404.
This is because you create a URL as if it were a web page, but instead you open the image, not a web page.
just insert the extension of the attachment (eg .jpg) at the end of the URL instead of the final slash "/"

example:
http:// www. torrevado.info/forum-salento/attachments/articolo-porto-jpg.1627/

p.s. About robots.txt, I want my attachments to be indexed all.
 

Attachments

  • Senza-titolo-1.webp
    Senza-titolo-1.webp
    24.7 KB · Views: 5
Top Bottom