Jump to content
  • 0
dasigrist

Hiding the query strings parameter

Question

Hi Gurus,

I have a business directory and I dynamically create a company's page passing the company ID as a parameter like this: https://example.com/company/?Company_ID=3267. I would like my URL to shows like a company's page in LINKEDIN: https://example.com/company/3267/, hiding the "?Company_ID=" from my details page.

is that possible?

 

thank you

Daniel

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Ok, so I was able to create a HTML block on my datapage like this:
<script>
var myNewURL = "[@field:Company_ID]";//the new URL
window.history.pushState({}, document.title, "/" + myNewURL + "/" );
</script>

but this is not a valid URL. I cannot copy and paste it on another browser or share this URL. Is there something like Linkedin, where I have: https://example.com/company/3267/ as a working URL and if I copy and paste this URL I will go to the right page?

 

Thank you

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...