SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Addict
    Join Date
    May 2007
    Location
    West Coast
    Posts
    345
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Redirect Not Working to Changed pages

    site is now a newer php driven site. This code worked fine in the older site, but it did not have 301 redirects. I want some popular pages to still be accessed.

    IDK how the front page got there. maybe the host inserted it.
    Code:
    # -FrontPage-
    
    IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*
    
    <Limit GET POST>
    order deny,allow
    deny from all
    allow from all
    </Limit>
    <Limit PUT DELETE>
    order deny,allow
    deny from all
    </Limit>
    
    AddHandler server-parsed .html
    
    ErrorDocument 404  http://www.website.com/404
    
    Options +FollowSymLinks
    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^website.com
    RewriteRule (.*) http://www.website.com/$1 [R=301,L]
    
    RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.htm\ HTTP/
    RewriteRule ^index\.htm$ http://website.com/ [R=301,L]
    
    RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/
    RewriteRule ^index\.htm$ http://website.com/ [R=301,L]
    
    RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /extra-income\.html\ HTTP/
    RewriteRule ^index\.htm$ http://website.com/niche/extra-income/ [R=301,L]
    
    RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /payoff\.htm\ HTTP/
    RewriteRule ^index\.htm$ http://website.com/calculators/payoff/ [R=301,L]
    
    RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /calcs\.htm\ HTTP/
    RewriteRule ^index\.htm$ http://website.com/calculators/ [R=301,L]
    
    RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /zero_my_hero\.htm\ HTTP/
    RewriteRule ^index\.htm$ http://website.com/zero_my_hero/ [R=301,L]
    
    RewriteEngine On
    RewriteRule ^go/([/_0-9a-zA-Z-]+)$providers.php?id=$1
    
    
    <FilesMatch ".(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$">
    Header set Cache-Control "max-age=2592000, public"
    </FilesMatch>

  2. #2
    SitePoint Addict
    Join Date
    May 2007
    Location
    West Coast
    Posts
    345
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    anything here that stands out for why it is not working?


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •