URL format and redirection to that page

Hi Everyone,

We are migrating our existing website into HubSpot. only frontend, Backend still we are using existing server DB.
We have the existing site URL format that looks like below.
Example: www.hubspot.com/<statename>/create

Here, if we hit this URL I will open the form and collect the form data from the user and store it under the particulate state.
Now, I have created the page in HubSpot CREATE page. But that URL looks like
Example: www.hubspot.com/create
if, I pass my state name as a parameter. the URL looks like
Example: www.hubspot.com/create?statename=<statename>
then only works if I pass a parameter in the URL format it’s wont working.
Please help me here.
I want the expected URL should be like below. how can I achieve this?

Example:
www.hubspot.com/<statename>/create

NOTE: <statename> is dynamic. it also should work for the new state.

Hello @Sk05
you can also use a JavaScript function to redirect the user to the new URL.

function redirectToNewUrl() {
 var statename = getParameterByName("statename");
 var newUrl = "www.hubspot.com/" + statename + "/create";
 window.location.href = newUrl;
}

add it to the head section of your HTML page. Then, add a link to the page with this code.

<a href="#" onclick="redirectToNewUrl()">Click here to redirect</a>

when user will click on the link. JavaScript function will be called and the user will be redirected to the new URL.

Hi @himanshurauthan Thanks for the reply, I am not asking how to redirect to that URL. I want to build the page with that URL format.
My problem is the URL format of the page. Even if I did that I will get the 404 error.
I want to create a page with that URL format. Dynamic URL format and passing my argument via parameters.