| | |
How to hide query string in url with .htaccess
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Thread Solved |
Hello...
Good Morning All...
How to hide all query strings in my url and here i can't use hidden variables for these all because in all times i couldn't send them with form submission..And my page is having four query strings to be sent...
If any body have any clues or information about this...
Please i request you to place here...
Thanks in Advance...
Shanti.
Good Morning All...
How to hide all query strings in my url and here i can't use hidden variables for these all because in all times i couldn't send them with form submission..And my page is having four query strings to be sent...
If any body have any clues or information about this...
Please i request you to place here...
Thanks in Advance...
Shanti.
Last edited by Shanti Chepuru; Feb 25th, 2009 at 12:43 am.
Be intelligent, But Don't try to cheat.. Be innocent But Don't get cheated..
Do you meen something like sessions. Sessions will allow you to pass variables between pages and are very simple to use. Simple place at the very top of your pages that use sessions the following code:
Then below is an example of how to use the session array:
Then page2.php
php Syntax (Toggle Plain Text)
<? session_start();
php Syntax (Toggle Plain Text)
<? session_start(); $_SESSION['variable_name']='apple'; $_SESSION['testing']='orange'. ?> <a href='page2.php'>Page 2</a>
php Syntax (Toggle Plain Text)
<? session_start(); echo $_SESSION['variable_name']; echo " is different to a "; echo $_SESSION['testing']; ?>
Try not to bump 10 year old threads as it can be really annoying.
Like php then read my website at http://syntax.cwarn23.net/
Star-Trek-Atlantis - now that's what I call a movie ^_^
My favourite PC. - MacGyver Fan
Bad english note: dis-iz-2b4u
Like php then read my website at http://syntax.cwarn23.net/
Star-Trek-Atlantis - now that's what I call a movie ^_^
My favourite PC. - MacGyver Fan
Bad english note: dis-iz-2b4u
No...
thanks for your quick reply...
Is it possible with rewriting concept...
And one more thing..
should i use only one .htaccess file to access all of my folders in mysite.. And how to use rewrite conditions..
Thanks in advance...
thanks for your quick reply...
Is it possible with rewriting concept...
And one more thing..
should i use only one .htaccess file to access all of my folders in mysite.. And how to use rewrite conditions..
Thanks in advance...
Be intelligent, But Don't try to cheat.. Be innocent But Don't get cheated..
Well I just don't see how it is possible to use a htaccess file to hide the url info unless you have a dedicated virtual file for each possible input variable.
Try not to bump 10 year old threads as it can be really annoying.
Like php then read my website at http://syntax.cwarn23.net/
Star-Trek-Atlantis - now that's what I call a movie ^_^
My favourite PC. - MacGyver Fan
Bad english note: dis-iz-2b4u
Like php then read my website at http://syntax.cwarn23.net/
Star-Trek-Atlantis - now that's what I call a movie ^_^
My favourite PC. - MacGyver Fan
Bad english note: dis-iz-2b4u
means for each possible hidden value, there would need to be a different file path.
Try not to bump 10 year old threads as it can be really annoying.
Like php then read my website at http://syntax.cwarn23.net/
Star-Trek-Atlantis - now that's what I call a movie ^_^
My favourite PC. - MacGyver Fan
Bad english note: dis-iz-2b4u
Like php then read my website at http://syntax.cwarn23.net/
Star-Trek-Atlantis - now that's what I call a movie ^_^
My favourite PC. - MacGyver Fan
Bad english note: dis-iz-2b4u
Rewrite rules don't actually hide the query string. Rewrite rules pretty much convert seo friendly urls into the actual query string.
Example .htaccess:
The above rewrite rule will allow you to do something like this:
url reads: yoursite.com/DaniWeb.html
apache interprets as: yoursite.com/viewPage.php?ID=DaniWeb
Therefore
will output DaniWeb.
Example .htaccess:
PHP Syntax (Toggle Plain Text)
RewriteEngine on RewriteRule ([^/\.]+)/?.html$ viewPage.php?ID=$1 [L]
url reads: yoursite.com/DaniWeb.html
apache interprets as: yoursite.com/viewPage.php?ID=DaniWeb
Therefore
php Syntax (Toggle Plain Text)
<?php $id=$_GET['ID']; echo $id; ?>
Lost time is never found again.
- Benjamin Franklin
- Benjamin Franklin
![]() |
Other Threads in the PHP Forum
- Previous Thread: File Encription
- Next Thread: Payment gateways?( urgent)
| Thread Tools | Search this Thread |
advanced apache api array beginner binary broken cakephp check checkbox class cms code cookies cron curl database date datepart display dropdownlist dynamic echo email eregi error execution file files folder form forms function functions google head href htaccess html if...loop image include includingmysecondfileinthechain insert ip javascript job joomla jquery key library limit link login mail menu mlm multiple mysql oop password paypal pdf pdfdownload php phpvotingscript problem query radio random recursion remote screen script search server sessions smarty sms sorting source space sql startup stored syntax system table traffic tutorial unicode update upload url validator variable video web youtube zend






