![]() |
mod_rewrite question
Is there anyway to direct the wildcards to my 404 so it sends the 404 header?
for instance.. blah.domain.com or just domain.com hit 404 so if say... google spider requests a wildcard, or just domain.com, or a page that doesnt exist, it gets the 404 page? |
You would rather allow Google to spyder and give you the traffic based on the domain... Unless it is only going to be getting duplicate content. If it isn't going to be getting duplicate content then you would allow it to come in...
|
If it was going to be duplicate content then you would want to help yourself out SE wise and do a 301 so the SE's will give you credit.
|
i dont want to do anything except what I asked about... does anyone know how to do it?
|
Would something like this work?
ErrorDocument 404 http://domain.com/404.html RewriteCond %{HTTP_HOST} !^www\.domain\.com$ [NC] Rewriterule (.*) http://www.domain.com/$1 [R=404] 404 goes to your page without www Rewrite adds the www and returns 404. Also catches any referrals without www. Or this just goes to root: ErrorDocument 404 http://domain.com/ RewriteCond %{HTTP_HOST} !^www\.domain\.com [NC] Rewriterule (.*) http://www.domain.com/ [R=404] or 404 page: ErrorDocument 404 http://domain.com/ RewriteCond %{HTTP_HOST} !^www\.domain\.com [NC] Rewriterule (.*) http://www.domain.com/404.html [R=404] |
thanks mikey
I'll give those a try :) |
All times are GMT -7. The time now is 08:55 AM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123