Make url into variable

Hi

I’m still very much a beginner so don’t really understand how this might be done.

I need a client to be able to add there own url to some code but wanted to separate it, so they can paste it at the top of the code so its clear for them to see. Then reference the variable in the link.

thanks

use get method to pass the variable into the url. the rewrite the url using any “url rewrite tool” then paste the new url in .htaccess file.

Client cant get to the htaccess file as this is through a CMS.

None of those sorts of changes can be done with JavaScript. I suggest that you investigate using a server-side script, such as PHP, to perform the task instead.