Redirect from facebook with functions check is click from facebook urgent

i want something like this
https://cutenessoverdose.netlify.app/.netlify/functions/server/post/4182
and can redirect from facebook only this is my netflify link
screenshots of my folder

hi there, before we dig in, did you see this brand new guide on debugging redirects?

I strongly suggest you give it a thorough read through and see if this fixes your problem:

if not, please post again, and we’ll try and troubleshoot.

yes i want something similar to this girl

i do exact in this guide nothing !!

Hi @redaboubkraoui,

As you can see in the thread you just linked, I’ve explained various methods of how this can be achieved. If you’re having a problem with that, please let me know what you’ve tried and what error you’re getting.

To set some limits, you need help with custom code, and that’s not the level of support we generally provide.

1 Like

done thanks
have only one problem
is how to change function url to something like site.netlify.app/functions/****/***/script
and the function you share the location said is not defined
location.pathname.split(’/’)[2].split(’-’)

second how i can return a html page from folder or something like this
thanks

Simply setup the redirects as you need: Rewrites and proxies | Netlify Docs

I shared one after that:

There’s an example I shared in that discussion. Please read it carefully. I’m linking it here too:

i mean render html file not write the file data in same file

Did you try the example I shared? It’s rendering the page and sending it back to the browser and not editing the file in the repo.

the file is js
i’m not good on it

sorry for that let me explain my idea i want to render html page not js

You need to use JS to render HTML :slightly_smiling_face:

To return a HTML file from serverless functions, you’d have to write the logic to generate a HTML file on the fly. This logic can be in JavaScript, Go or Rust.

1 Like

give example of js please
i try the rewrite but nothing happen

when i use this /.netlify/functions/server/post/111
told it’s not found

any help please still nothing

Can you give any example of the redirects you’ve tried implementing?

If you can provide code in the function you are using, the community can assist you debugging that code.

i don’t to use redirect i want my function link to be like this
/.netlify/functions/server/post/111
this how is
/.netlify/functions/111
and want to render a html pâge when call the the function link

I understand that.

How are you trying to achieve this? Can you provide the code you are using that is not working?

1 Like