|
|
||||||
|
||||||
| Index Link To US Private Messages Archive FAQ RSS | ||||||
| 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
|
||||
|
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
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! |
|
|||
|
Try this forum, maybe that will receive responses
|
|
|||
|
Hi there,
Please read below post it has solution http://www.webmastershome.com/detail4.html good luck! |
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
|
WebProWorld |
Advertise |
Contact Us |
About |
Forum Rules |
MVP's |
Archive |
Newsletter Archive |
Top |
WebProNews
WebProWorld is an iEntry, Inc. ® site - © 2009 All Rights Reserved Privacy Policy and Legal iEntry, Inc. 2549 Richmond Rd. Lexington KY, 40509 |