Webmaster Forum

Go Back   Webmaster Forum > Web Development > Coding Forum

Coding Forum Problems with your code? Discuss coding issues, including JavaScript, PHP & MySQL, HTML & CSS, Flash & ActionScript, and more.


Reply
 
Thread Tools Display Modes
Share |
  #1  
Old 01-30-2007, 11:33 PM
esiason14 esiason14 is offline
Junior Member
 
Join Date: 01-15-06
Location: Linthicum, MD
Posts: 2
iTrader: 0 / 0%
htaccess 301 redirect

Hi,
I'm trying to figure out to add a 301 to my htaccess. I currently have these rules:

Code:
RewriteRule ^players.php/(.*)/(.*)/(.*)/(.*)/(.*)/(.*)/(.*)/(.*)/$ /players.php?$1=$2&$3=$4&$5=$6&$7=$8 [L] RewriteRule ^players.php/(.*)/(.*)/(.*)/(.*)/(.*)/(.*)/(.*)/(.*)/(.*)/(.*)/$ /players.php?$1=$2&$3=$4&$5=$6&$7=$8&$9=$10 [L] RewriteRule ^historical_fantasy_pts/year/([^.]+)/position/([^.]+)$ historical_fantasy_pts.php?year=$1&position=$2 [L] RewriteRule ^historical_fantasy_pts/year/([^.]+)/position/([^.]+)week/([^.]+)/$ historical_fantasy_pts.php?year=$1&position=$2&week=$3 [L]
Basically I want to 301 all the old players.php and historical_fantasy_pts.php pages to the new ones. Any help would be appreciated.

Thanks!
 
Reply With Quote

Advertisement

Advertisement

  #2  
Old 01-31-2007, 12:42 PM
StupidScript's Avatar
StupidScript StupidScript is offline
Senior Member
 
Join Date: 09-22-06
Location: Los Angeles
Posts: 663
iTrader: 0 / 0%
Welcome aboard, esiason14!

Taking the tail end of your first rule as an example:
Code:
RewriteRule ^players.php/(.*)/(.*)/...$ /players.php?$1=$2&... [R=301,L]
Hope that helps!
 
Reply With Quote
  #3  
Old 01-31-2007, 12:44 PM
esiason14 esiason14 is offline
Junior Member
 
Join Date: 01-15-06
Location: Linthicum, MD
Posts: 2
iTrader: 0 / 0%
Thanks, StupidScript! That was easy enough
 
Reply With Quote
Go Back   Webmaster Forum > Web Development > Coding Forum

Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
.htaccess 301 redirect modine Coding Forum 14 06-12-2007 11:28 AM
.htaccess redirect problem..! Immo Coding Forum 16 08-03-2006 04:02 AM
.htaccess redirect question Pimpen 2010 Coding Forum 4 04-04-2006 10:34 AM
htaccess/mod rewrite help to redirect subdomain to a domain Thanol Coding Forum 0 07-19-2004 09:36 AM
.htaccess redirect to new webspace luchtzak Coding Forum 7 01-25-2004 09:56 AM


V7N Network
Get exposure! V7N I Love Photography V7N SEO Blog V7N Directory


All times are GMT -7. The time now is 07:05 PM.
Powered by vBulletin
Copyright 2000-2014 Jelsoft Enterprises Limited.
Copyright © 2003 - 2018 VIX-WomensForum LLC