URL Rewrite Help Get Method?
-
Ok, I have tried to research this on my own so please spare me the simple page links to search results on GET Method or Mod_Rewrite. I need to rewrite a url from a get method search form like this. <form action="" method="get" name="form1" id="form1"> <span class="style7"> <div align="center"> State: <input name="state" size="3" maxlength="2" /> City: <input name="city" size="30" /> <input type=SUBMIT value="Go There!" /> <p></p> </div> </span> </form> Where a user can enter a city name and a state code. Such as Seattle WA and currently it returns it in a query string (obviously) What steps do I need to take to rewrite this to rewrite the url as www.domain.com/state/wa/city/seattle.h… Which is where the page will reside. I have messed around with my .htaccess file countless times trying various codes using all types of things (and from rewrite code generators) and nothing happens. Do I need a php file to process it? Any code would be a huge help!
-
Answer:
You definitely need a script to process the form. Right now you form won't do anything because the action is "" which means nothing. You need to have the action call a script that processes the form. This can be PHP, Java, ASP or a bunch of other things. The easiest one to do would probably PHP
david r at Yahoo! Answers Visit the source
Related Q & A:
- How to rewrite URL in HTTPS?Best solution by Server Fault
- How to rewrite URL using htaccess?Best solution by Stack Overflow
- How to rewrite the URL in Yii2?Best solution by Stack Overflow
- How to Rewrite URL in htaccess with php?Best solution by Stack Overflow
- What are some good home remedies to help get rid of bad scars?Best solution by natural-homeremedies.com
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.