If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > PHP > Apache mod_rewrite

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-21-09, 06:33
dimis2500 dimis2500 is offline
Registered User
 
Join Date: Jan 2005
Posts: 362
Apache mod_rewrite

I want to use Apache mod_rewrite with a .htaccess file and to do this
the url
Quote:
siteurl/index.php/product?pr=jjk4zi86NxVVRL&code=thecode
to be
Quote:
siteurl/index.php/thecode/product?pr=jjk4zi86NxVVRL
How can I do that?
Reply With Quote
  #2 (permalink)  
Old 07-21-09, 22:11
loquin loquin is offline
Super Moderator
 
Join Date: Jun 2004
Location: Arizona, USA
Posts: 1,797
take a look at the explode string function.

You could also use the substr function, in conjunction with the strpos function, to return the substring which starts at position 1 and ends at the position of '&code'
__________________
Lou
使大吃一惊
"Lisa, in this house, we obey the laws of thermodynamics!" - Homer Simpson
"I have my standards. They may be low, but I have them!" - Bette Middler
"It's a book about a Spanish guy named Manual. You should read it." - Dilbert


Last edited by loquin; 07-21-09 at 22:16.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On