WordPress.org

Ready to get started?Download WordPress

Forums

Can someone check my .htaccess code? (18 posts)

  1. rachellucie
    Member
    Posted 2 years ago #

    Hi there,

    I have an old blogger blog that ranks quite well, and I have migrated over to wordpress.org. I have had someone help with this process, and they have added this .htaccess file. It should be redirecting from blogger to wordpress, for the RSS feed also. Does it look ok?

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    # Redirect Main Blog feeds
    #ATOM Feeds
    RewriteRule atom.xml feed/atom/ [L,R=301]
    RewriteRule feeds/posts/default feed [L,R=301]
    
    #RSS FEEDS
    RewriteRule feeds/posts/default?alt=rss feed/ [L,R=301]
    RewriteRule rss.xml feed/ [L,R=301]
    
    #Comments Feed
    RewriteRule /feeds/comments/default  comments/feed/  [L,R=301]
    RewriteRule /feeds/comments/default?alt=rss comments/feed/  [L,R=301]
    
    #Redirect archives
    RewriteRule ^([0-9]{4})_([0-9]{1,2})_([0-9]{1,2})_archive\.html$ $1/$2/ [L,R=301]
    
    #Redirect labels/tags/categories
    RewriteRule ^search/label/(.*)$ category/$1/ [L,R=301]
    </IfModule>
    # End http://bloggertowp.org
    
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . index.php [L]
    </IfModule>
    # END WordPress
  2. loughcorrib
    Member
    Posted 2 years ago #

    Moving Domains Is this a continuation of above.

  3. rachellucie
    Member
    Posted 2 years ago #

    hi loughcorrib, thanks for your reply (to both posts!)
    You are correct, and I am trying to get answers. however, your answer doesn't really help me at all.

    my host doesn't help with my wordpress domain redirect or migration, they merely check the hosting is ok.

    I hired someone to do the migration for me, but it has not gone well and although I have found a few things on the web about .htaccess, it is totally new to me and I don't understand it. My subscribers via feedburner have plummeted over the last couple of days, and I am trying to see if this redirect has been handled correctly. Some detailed feedback would be really appreciated.

  4. loughcorrib
    Member
    Posted 2 years ago #

    What's your url

  5. rachellucie
    Member
    Posted 2 years ago #

    http://blog.rachellucie.co.uk thanks :)

  6. @rachellucie? Please do not create multiple threads for the same topic. We close the duplicates.

    http://wordpress.org/support/topic/wordpress-on-subfolder-needs-to-point-to-subdomain?replies=3

    I'm closing the other one (normally we keep open the original and close the dupes) so please keep to one thread per topic.

  7. loughcorrib
    Member
    Posted 2 years ago #

    Feed works ok for me. Though I had to add it to url,could not see feed.png on site.

  8. rachellucie
    Member
    Posted 2 years ago #

    should I be able to see that, what can I do about it? thanks @loughcorrib

    @Jan - they were not duplicate threads! they were definitely related, but not duplicates. Maybe volunteer mods could join in some of the threads and they may get resolved quicker?

  9. loughcorrib
    Member
    Posted 2 years ago #

    Thanks Jan there are a few more I have subscribed to that I presume are resolved they are so old.

  10. loughcorrib
    Member
    Posted 2 years ago #

    Rachel we are all volunteers here. Totaly agree with Jan on this

  11. loughcorrib
    Member
    Posted 2 years ago #

    Rachel this site appears important to you . You should seek a wp guy to help you out at wpjobs. See below

  12. @Jan - they were not duplicate threads! they were definitely related, but not duplicates.

    I've re-read the original, just like horse shoes and hand grenades it's close enough for volunteer work.

    That's a joke BTW, I'm trying to lighten things up. :)

    Maybe volunteer mods could join in some of the threads and they may get resolved quicker?

    We all do contribute all the time, mods and regular members alike. Mods aren't much different from any other volunteers, we just get more responsibility.

    But here goes:

    As far as I can tell, your rules looks alright. These two I'm less sure about.

    #Redirect archives
    RewriteRule ^([0-9]{4})_([0-9]{1,2})_([0-9]{1,2})_archive\.html$ $1/$2/ [L,R=301]
    
    #Redirect labels/tags/categories
    RewriteRule ^search/label/(.*)$ category/$1/ [L,R=301]
    </IfModule>
    # End http://bloggertowp.org

    The reason I'm less sure is due to my lack of familiarity with Blogger URLs.

    If there is a doubt and you have access to all the Blogger URLs, then you can add them statically like so without the regex.

    #Redirect archives
    RewriteRule ^2012_02_02_archive\.html$ new-permalink1/new-slug1/ [L,R=301]
    RewriteRule ^2011_02_02_archive\.html$ new-permalink2/new-slug2/ [L,R=301]
    etc.

    Once I had to do that with some off MT URLs like that because the Regex didn't quite line up. After a couple of weeks the search engines all had the new URLs and that all came out later on.

    Hope that helps.

    Edit: Also, you may want to familiarize yourself with the Forum Welcome.

    http://codex.wordpress.org/Forum_Welcome

    It's the guideline for posting code, behaving, etc.

  13. loughcorrib
    Member
    Posted 2 years ago #

    Hold the phone, mea culpa. If feedburner try this!Just replace our feed/your comments with specifics

    <IfModule mod_rewrite.c>
     RewriteEngine on
     RewriteCond %{REQUEST_URI}      ^/?(feed.*|comments.*)        [NC]
     RewriteCond %{HTTP_USER_AGENT} !^.*(FeedBurner|FeedValidator) [NC]
     RewriteRule ^feed/?.*$          http://feeds.feedburner.com/your feed        [L,NC,R=302]
     RewriteRule ^comments/?.*$      http://feeds.feedburner.com/your comments [L,NC,R=302]
    </IfModule>

    It appears the redirect is for feeds and not feedburner. Could be wrong. I am human I think !!

  14. rachellucie
    Member
    Posted 2 years ago #

    @Jan thank you :)

    @loughcorrib - that looks good! would I simply replace a part of my original htaccess with that? If so, would you be able to direct me accordingly?

    btw, I tried to search code forum repeatedly for posts on .htaccess, and I got this message:

    Access Denied
    Sorry, but the WordPress.org website appears to be having problems at the moment. Try again later.

    thanks!

  15. rachellucie
    Member
    Posted 2 years ago #

    ok, I found some info that's helping explain (I think http://perishablepress.com/redirect-wordpress-feeds-to-feedburner-via-htaccess-redux/ it has the code you gave me @loughcorrib) but gives me the question that I don't know if I am burning my comment and post feeds in feedburner. My original feed url as provided by the person who (supposedly) sorted this is blog.rachellucie.co.uk/feed/ as entered in feedburner. Is this correct?

    I am reading http://codex.wordpress.org/WordPress_Feeds - oh boy, it gets worse! Is it a possible or even a good idea to have 1 feed for all, burnt by feedburner? If not, how do I replace the original blogger feed with 2 wordpress ones (comments/posts)?

    I have learnt a lot, though, I'll get it!

  16. loughcorrib
    Member
    Posted 2 years ago #

    FTP to your site and paste the code into htaccess If you have not done this before get a web guy to do it Your htaccess is crucial to your site So don't mess around with it

  17. rachellucie
    Member
    Posted 2 years ago #

    cheers, @loughcorrib. I'm ok with ftp, and that code I pasted originally is the htaccess pasted by the guy that was supposed to sort all this. I don't want to mess about. I wondered if I could replace all or some of that with the updated version you gave me (which seems to be quoted on the web elsewhere, too).

    On another note, I have installed the feedsmith feedburner extend plugin. I believe this should amalgamate all my wordpress site feeds?

  18. loughcorrib
    Member
    Posted 2 years ago #

    Just paste the code as an additional, then you are covering feeds and feedburner. As for plugin I would close this and open a seperate post in plugin forum. Where you have a chance of getting the plugin author.Who are the best people to go to for support
    Don't forget to replace myfeeds with feed site feed whatever best of luck

Topic Closed

This topic has been closed to new replies.

About this Topic