Does anything get redirected?
Does anything get redirected?
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...
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?
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...
So you WILL see a standard 404 response for a missing file or directory from hostgator - search hostgator 404 - Google SearchThe 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.
That means the request never gets as *deep(high) as your .htaccess rewrite.
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...
So if I request http://www.mydomain.com/2009/09/seo-...es/splunge.phpCode:RewriteRule http://www.mydomain.com/2009/09/seo-web-design-services http://www.mydomain.com
I'll get http://www.mydomain.com/splunge.php
Code:RewriteRule http://www.mydomain.com/2009/09/seo-web-design-services.* http://www.mydomain.com
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...
this is what I found from a search here and there...
andCode:RewriteRule http://www.mydomain.com/2009/09/seo-web-design-services.* http://www.mydomain.com
...and that didn't work either...Code:RewriteRule ^seo-web-design-services(.*)$ http://www. mydomain.com$1 [L,R=301]
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]
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