Jump to content

Recommended Posts

in <form method="get">, when you submit it the url will look something like this

 

http://www.mydomain.com/search.php?keywords=phpfreaks&author=phpfreaks

 

but how do i make the url like this

 

http://www.mydomain.com/search/keywords/phpfreaks/author/phpfreaks

 

when i submit the form?

Link to comment
https://forums.phpfreaks.com/topic/182067-methodget/
Share on other sites

The simple answer is you don't. If you need to do it when the form is submitted I believe you may have to submit to a script in the usual manner and have that script do a redirect, creating the new url from the $_GET[] array. You would then need to use a .htaccess file to redirect that file back to the original format (but that's in the background so the visitor doesn't see it) in order to process it. It sounds both complicated and stupid, but it's the only way I can see around it. It's getting late though, entirely possible I missed a much more obvious elegant solution.

Link to comment
https://forums.phpfreaks.com/topic/182067-methodget/#findComment-960474
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.