2

Is there a way to get "vanity URLs" for my assets? Something like:

www.example.com/download/asset.pdf

rather than:

www.example.com/several/subfolders/for/organisation/purposes/asset.pdf

I know that dumping all assets into a /download folder will work but this is far from an ideal solution. Is there another way?

5

Perhaps using redirects and Regex in your .htaccess? There's a Craft plugin that would help with this. https://github.com/rkingon/Craft-Plugin--Redirect-Manager/

You could use something like:

RedirectMatch 301 /download/(.*) /several/subfolders/for/organisation/purposes/$1 

You would need to refine this for matching several different subfolders.

|improve this answer|||||
  • Thank you for this. I asked the question and then kinda forgot about it. – Bruce Johnson Feb 24 '15 at 21:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.