Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9147621
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T11:02:22+00:00 2026-06-17T11:02:22+00:00

First Quesiton: This form submits to demo_form?name=ABC <form action=demo_form method=get> name: <input type=text name=name><br>

  • 0

First Quesiton:

This form submits to demo_form?name=ABC

<form action="demo_form" method="get">
  name: <input type="text" name="name"><br>
  <input type="submit" value="Submit">
</form>

Is there a way to make it submit to demo_form/ABC/?

Second Question:

Even if users don’t use my form, if they use a web crawler to simply visit demo_form?name=ABC or demo_form/ABC/, it would yield the same result. I want to prevent that. What’s the best way of making those two URLs only valid if the user submit the name via my form? I am learning django so hopefully the solution would work with django framework.

Thanks in advance!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T11:02:24+00:00Added an answer on June 17, 2026 at 11:02 am

    Is there a way to make it submit to demo_form/ABC/?

    You could intercept the submission in JavaScript, construct the URL manually, then set location. That would break if JS wasn’t available.

    More sanely, you could send an HTTP 301 redirect response when you get the request for demo_form?name=ABC

    What’s the best way of making those two URLs only valid if the user submit the name via my form?

    Generally speaking, visiting a form should not be a pre-requisite for anything involving a GET request. A large portion of the point of GET is that the results are bookmarkable, linkable, etc.

    It would be more understandable if it was a POST request, as those are intended to change data on the server and you will want to protect against CSFR. The standard protection against CSRF is a token stored in the form and in a cookie

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this form, with 2 submit buttons: <form method=post onsubmit=send_mail(this);return false> <select name=liste>
Ajax function $(function () { $('form').submit(function () { if ($(this).valid()) { $.ajax({ url: this.action,
I have a form where i've replaced the submit button with an input (with
I can use a GET request to submit HTML form data. If a HEAD
i have this question: creating 2 pages in php the first(index.php) contain a form
This is probably not your usual How do I capture form submit events? question.
Hey this is my first question on this website. Im creating a webpage for
This is my first question in this forum, so i hope to be clear:
nobody loved my first question about this: Creating Entity Framework objects with Unity for
This is my first question to this forum. I am trying to make this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.