iEntry 10th Anniversary Forum Rules Search
WebProWorld
Register FAQ Calendar Mark Forums Read
Web Programming Discussion Forum Working with an API? Developing a plugin? Writing a Mod or script for your favorite blog, Web 2.0 site or Forum? Welcome.

Share Thread: & Tags

Share Thread:

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-01-2004, 11:26 PM
WebProWorld New Member
 
Join Date: Sep 2004
Location: skynet
Posts: 8
kisk RepRank 0
Default mod_rewrite ... need to get query values and forward to /pag

Hi. Ok, here's the setup: I'm using php and trying to use mod_rewrite to make all my pages SE friendly.

My old pages were in the format:
site.com/customize.php?shirt=BLAH

The way I have it setup now I have my links going here:
site.com/t-shirts/BLAH/

This is the rule I used and it works fine::
RewriteRule ^t-shirts/([a-zA-Z0-9_-]+)(/*)?(.*)?$ /customize.php?shirt=$1 [L]


The problem is I have incoming links pointed at my customize.php page so I'd like to do a 301 redirect (permanent) from the customize.php page to the new page which uses the rewrite (/t-shirts/BLAH/).

I'm pretty sure I need to use a RewriteCond to pull the query value and pass it but I'm not sure how to do it. My attempt was like this:
RewriteCond %{QUERY_STRING} shirt=([^&;]*)
RewriteRule ^customize.php$ /t-shirts/%1/ [R=301,L]

... but it always leads me to /t-shirts/THE_COMPLETE_QUERY

With:
RewriteRule ^customize.php$ /t-shirts/%1/ [R=301,L]

.. how do I make %1 just be the VALUE of 'shirt='?


Thanks!
Reply With Quote
  #2 (permalink)  
Old 10-02-2004, 08:48 AM
WebProWorld Veteran
 
Join Date: May 2004
Location: London, UK
Posts: 552
pedstersplanet RepRank 0
Default

Try this forum, maybe that will receive responses
__________________
Regards, Peter
UK Web Hosting | Website Directory
Reply With Quote
  #3 (permalink)  
Old 10-05-2004, 04:38 AM
WebProWorld New Member
 
Join Date: Jun 2004
Posts: 7
jitender RepRank 0
Default

Hi there,

Please read below post it has solution

http://www.webmastershome.com/detail4.html

good luck!
Reply With Quote
Reply

  WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum

Thread Tools
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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 07:46 AM.



Search Engine Optimization by vBSEO 3.3.0