Jump to content

Hide files urls in site/assets/files directory?


msavard
 Share

Recommended Posts

Is it possible to hide the URL to the various files in the site/assets/files directory from being indexed?

For example, say I have a site at somesite.com. I have a PDF file that someone can download at somesite.com/site/assets/files/1376/mypdf.pdf. Is there a way to hide all that and just have the link be something like somesite.com/pdfs/mypdf.pdf?

I guess it doesn't really matter, it just looks messy having all those site/assets/files/1075/etc/etc in there.  

Link to comment
Share on other sites

The easiest and fastest solution would probably be to disable/disallow indexing of PDFs:

https://cloudpdf.io/blog/how-to-prevent-your-pdf-documents-from-being-indexed-by-search-engines (not the robots.txt way!)

 

But... are those PDFs worth being indexed by Google or anyone else?
If so you could look into URL hooks:

https://processwire.com/blog/posts/pw-3.0.173/

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...