How to deal with online forms (with method=GET)
2 posts
• Page 1 of 1
How to deal with online forms (with method=GET)
So I have an online form with METHOD=GET, and a keyword INPUT field.
When user clicks the SUBMIT button, the following URL shows up on the next screen.
www.company.com/search.asp?keyword=some-text-here
How can I make the URL that shows up on the browser look like
www.company.com/search/some-text-here
Do I need a Redirect here? Or a RewriteRule?
When user clicks the SUBMIT button, the following URL shows up on the next screen.
www.company.com/search.asp?keyword=some-text-here
How can I make the URL that shows up on the browser look like
www.company.com/search/some-text-here
Do I need a Redirect here? Or a RewriteRule?
- HeliconAndrew
- Posts: 1264
- Joined: 07 Mar 2012, 10:16
Re: How to deal with online forms (with method=GET)
Hello,
Try using the following:
Regards
Andrew
Try using the following:
- Code: Select all
RewriteEngine on
RewriteBase /
RewriteCond %{QUERY_STRING} ^keyboard=([^&]+)$ [NC]
RewriteRule ^search\.asp$ /%1? [NC,R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]+)$ /search.asp?keyword=$1 [NC,L]
Regards
Andrew
2 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 0 guests