Submit Your Article Forum Rules

Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 25

Thread: 301 reditects, .htaccess and Wordpress

  1. #11
    Senior Member Uncle Dog's Avatar
    Join Date
    Apr 2008
    Posts
    342

    Re: 301 reditects, .htaccess and Wordpress

    Does anything get redirected?

  2. #12
    WebProWorld MVP morestar's Avatar
    Join Date
    Jun 2007
    Location
    Toronto, Ontario (Burlington)
    Posts
    4,249

    Re: 301 reditects, .htaccess and Wordpress

    Yes only to the 404 page if I visit a url that doesn't exist...that still works...I'm finding virtually nothing in search which helps with wordpress and .htaccess redirects...well I mean in regard to this particular problem. I think it's cause the redirect IS setup to go to the 404 page...
    Join a free dating site and meet single people in your area.
    Submit your content at my content publishing site and promote your business, services or opinions.

  3. #13
    Senior Member Uncle Dog's Avatar
    Join Date
    Apr 2008
    Posts
    342

    Re: 301 reditects, .htaccess and Wordpress

    No again. Wordpress writes the conditional in .htaccess to say -
    if you can do redirects
    if a visitor's looking for files or directories that don't exist, send them to index.php
    So if you're seeing a 404...

    Either you can't use .htaccess or the request isn't getting this far (getting redirected earlier).

    The 404? Is it yours? Are you on a shared server? It might be a rewrite at a *higher(lower) level.

    *Is it branches or is it roots?

  4. #14
    WebProWorld MVP morestar's Avatar
    Join Date
    Jun 2007
    Location
    Toronto, Ontario (Burlington)
    Posts
    4,249

    Re: 301 reditects, .htaccess and Wordpress

    Well rewrites have always seemed to work for me...on this level...never a problem...

    My host is hostgator but again, never had a problem...I have these type of redirects on other sites that don't have wordpress installed...and I know from what you're saying it's nothing to do with wordpress but...
    Join a free dating site and meet single people in your area.
    Submit your content at my content publishing site and promote your business, services or opinions.

  5. #15
    Senior Member Uncle Dog's Avatar
    Join Date
    Apr 2008
    Posts
    342

    Re: 301 reditects, .htaccess and Wordpress

    The 404 or Not Found error message is a HTTP standard response code indicating that the client was able to communicate with the server but the server could not find what was requested.
    So you WILL see a standard 404 response for a missing file or directory from hostgator - search hostgator 404 - Google Search

    That means the request never gets as *deep(high) as your .htaccess rewrite.

  6. #16
    WebProWorld MVP morestar's Avatar
    Join Date
    Jun 2007
    Location
    Toronto, Ontario (Burlington)
    Posts
    4,249

    Re: 301 reditects, .htaccess and Wordpress

    So why would the 404 page get served in the first place? If I go to other sites in my account and visit a non-existant page, I won't get an automatic 404 page displayed...
    Join a free dating site and meet single people in your area.
    Submit your content at my content publishing site and promote your business, services or opinions.

  7. #17
    Senior Member Uncle Dog's Avatar
    Join Date
    Apr 2008
    Posts
    342

    Re: 301 reditects, .htaccess and Wordpress

    Uh oh!

    Code:
    RewriteRule http://www.mydomain.com/2009/09/seo-web-design-services http://www.mydomain.com
    So if I request http://www.mydomain.com/2009/09/seo-...es/splunge.php
    I'll get http://www.mydomain.com/splunge.php

    Sorry.
    Code:
    RewriteRule http://www.mydomain.com/2009/09/seo-web-design-services.* http://www.mydomain.com

  8. #18
    WebProWorld MVP morestar's Avatar
    Join Date
    Jun 2007
    Location
    Toronto, Ontario (Burlington)
    Posts
    4,249

    Re: 301 reditects, .htaccess and Wordpress

    lol nope, I just copied your code AND had done that moments ago from what I found in a search and nada...nothing happens at all. It just sticks to the 404 page...
    Join a free dating site and meet single people in your area.
    Submit your content at my content publishing site and promote your business, services or opinions.

  9. #19
    WebProWorld MVP morestar's Avatar
    Join Date
    Jun 2007
    Location
    Toronto, Ontario (Burlington)
    Posts
    4,249

    Re: 301 reditects, .htaccess and Wordpress

    this is what I found from a search here and there...

    Code:
    RewriteRule http://www.mydomain.com/2009/09/seo-web-design-services.* http://www.mydomain.com
    and

    Code:
    RewriteRule ^seo-web-design-services(.*)$ http://www. mydomain.com$1 [L,R=301]
    ...and that didn't work either...
    Join a free dating site and meet single people in your area.
    Submit your content at my content publishing site and promote your business, services or opinions.

  10. #20
    WebProWorld MVP wige's Avatar
    Join Date
    Jun 2006
    Posts
    3,138

    Re: 301 reditects, .htaccess and Wordpress

    Hm. I don't think the last few will work, because you can't have a full URL with the http://domain as the first argument to RewriteRule.

    Honestly, I think the problem is that in the first rule you tried, you left off the leading slash (/). IE

    RewriteRule ^seo-web-design-services(.*)$ http://www. mydomain.com$1 [L,R=301]

    should be

    RewriteRule ^/seo-web-design-services(.*)$ http://www. mydomain.com$1 [L,R=301]

    So, to go from http://www.mydomain.com/2009/09/seo-...sign-services/ to http://www.mydomain.com/, the rule should be:

    RewriteRule ^/2009/09/seo-web-design-services/(.*)$ http://www.mydomain.com/ [L,R=301]

    This should be the first Rewrite rule in your list, and it should 301 any request to the folder in question to the domain home page.
    The best way to learn anything, is to question everything.
    WigeDev - Freelance web and software development

Page 2 of 3 FirstFirst 123 LastLast

Similar Threads

  1. Wordpress SEO & Security Friendly .htaccess & Pugins
    By Webnauts in forum Internet Security Discussion Forum
    Replies: 23
    Last Post: 03-29-2012, 08:50 AM
  2. Need help on wordpress .htaccess
    By loosapphire in forum Search Engine Optimization Forum
    Replies: 11
    Last Post: 10-09-2009, 04:00 AM
  3. WordPress htaccess issues
    By imsickofwebpro in forum Web Programming Discussion Forum
    Replies: 6
    Last Post: 01-18-2008, 09:59 PM
  4. Combining my .htaccess rewrites with WordPress rewrites
    By mantawebsolutions in forum Web Programming Discussion Forum
    Replies: 5
    Last Post: 04-05-2007, 02:46 AM

Posting Permissions

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