WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] .htaccess redirecting issue (3 posts)

  1. Jakets
    Member
    Posted 4 years ago #

    I'm trying to get my old rss feed to redirect to my new one on wp. I have a chat page redirecting perfectly, but for some reason it will not do this with my rss feed.

    Here is my current .htaccess:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    # END WordPress
    
    IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*
    
    Options All -Indexes
    
    Redirect 301 /pages/chat.html http://farmvillefanatic.com/chat/
    
    <Limit GET POST>
    #The next line modified by DenyIP
    order allow,deny
    #The next line modified by DenyIP
    #deny from all
    allow from all
    </Limit>
    <Limit PUT DELETE>
    order deny,allow
    deny from all
    </Limit>
    AuthName farmvillefanatic.com
    
    <Files 403.shtml>
    order allow,deny
    allow from all
    </Files>
    
    RewriteCond %{HTTP_REFERER} !^http://farmvillefanatic.com/.*$      [NC]
    RewriteCond %{HTTP_REFERER} !^http://farmvillefanatic.com$      [NC]
    RewriteCond %{HTTP_REFERER} !^http://www.farmvillefanatic.com/.*$      [NC]
    RewriteCond %{HTTP_REFERER} !^http://www.farmvillefanatic.com$      [NC]
    RewriteRule .*\.(jpg|jpeg|png|bmp)$ http://farmvillefanatic.com/pages/hotlink.html [R,NC]
    
    # BEGIN WPSuperCache
    <IfModule mod_rewrite.c>
    RewriteBase /
    AddDefaultCharset UTF-8
    RewriteCond %{REQUEST_URI} !^.*[^/]$
    RewriteCond %{REQUEST_URI} !^.*//.*$
    RewriteCond %{REQUEST_METHOD} !POST
    RewriteCond %{QUERY_STRING} !.*=.*
    RewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress|wp-postpass_).*$
    RewriteCond %{HTTP_USER_AGENT} !^.*(Android|2.0\ MMP|240x320|AvantGo|BlackBerry|Blazer|Cellphone|Danger|DoCoMo|Elaine/3.0|EudoraWeb|hiptop|IEMobile|iPhone|iPod|KYOCERA/WX310K|LG/U990|MIDP-2.0|MMEF20|MOT-V|NetFront|Newt|Nintendo\ Wii|Nitro|Nokia|Opera\ Mini|Palm|Playstation\ Portable|portalmmm|Proxinet|ProxiNet|SHARP-TQ-GX10|Small|SonyEricsson|Symbian\ OS|SymbianOS|TS21i-10|UP.Browser|UP.Link|Windows\ CE|WinWAP).*
    RewriteCond %{HTTP:Accept-Encoding} gzip
    RewriteCond %{DOCUMENT_ROOT}/blog/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html.gz -f
    RewriteRule ^(.*) /blog/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html.gz [L]
    
    RewriteCond %{REQUEST_URI} !^.*[^/]$
    RewriteCond %{REQUEST_URI} !^.*//.*$
    RewriteCond %{REQUEST_METHOD} !POST
    RewriteCond %{QUERY_STRING} !.*=.*
    RewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress|wp-postpass_).*$
    RewriteCond %{HTTP_USER_AGENT} !^.*(Android|2.0\ MMP|240x320|AvantGo|BlackBerry|Blazer|Cellphone|Danger|DoCoMo|Elaine/3.0|EudoraWeb|hiptop|IEMobile|iPhone|iPod|KYOCERA/WX310K|LG/U990|MIDP-2.0|MMEF20|MOT-V|NetFront|Newt|Nintendo\ Wii|Nitro|Nokia|Opera\ Mini|Palm|Playstation\ Portable|portalmmm|Proxinet|ProxiNet|SHARP-TQ-GX10|Small|SonyEricsson|Symbian\ OS|SymbianOS|TS21i-10|UP.Browser|UP.Link|Windows\ CE|WinWAP).*
    RewriteCond %{DOCUMENT_ROOT}/blog/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html -f
    RewriteRule ^(.*) /blog/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html [L]
    </IfModule>
    # END WPSuperCache

    And this is what I have been trying but cannot get to work:

    Redirect 301 /?tempskin=_rss2 http://farmvillefanatic.com/feed/

    The full path to the old rss was http://farmvillefanatic.com/index.php?tempskin=_rss2 and I have tried using an index.php before it as well, still no luck.

    Also any tips on cleaning up my .htaccess file (redundant lines, errors, etc...) would be appreciated.

  2. Shane G.
    Member
    Posted 4 years ago #

  3. Jakets
    Member
    Posted 4 years ago #

    Wow, thank you. The first one "redirection" worked perfectly and is much nicer than doing it by .htaccess. I never thought to use a plugin for this. I also managed to clean up my .htaccess file a lot afterwords. You rock!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.