PDA

View Full Version : redirect and 404



JayKay
23 Aug 2010, 01:32 PM
1) I have a redirect from mypage.com to www.mypage.com in htaccess with


RewriteCond %{HTTP_HOST} ^mypage.com [NC]
RewriteRule ^(.*)$ http://www.mypage.com/main/about-us/$1 [L,R=301]



but how can I redirect both from www.mypage.com and mypage.com =to=> www.mypage.com/main/about-us?

If the www.mypage.com is the same with www.mypage.com/main/about-us because it is redirected, will that affect SEO somehow?

2) with the help of htaccess I receive the variable from the URL ie. www.mypage.com/variable/
and in my index.php script there is a condition that if this variable is not one of the 4 given values and is incorrect then


header("HTTP/1.0 404 Not Found");
exit();


but all I see is blank screen when I type www.mypage.com/asdfa/
But I checked with Server header checker tool
http://www.webrankinfo.com/english/tools/server-header.php
and the server gave 404 error but as I said the screen is blank
BUT
when i type www.mypage.com/sdfsdf
then I see the correct 404 error response.

why is that so? should I be concerned?
my htaccess:


Options +FollowSymLinks
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} -d [OR]
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule .* - [L]
RewriteRule ^([^/]*)/([^/]*)/([^/]*)/$ index.php?lang=$1&page=$2&t=$3 [L]
RewriteRule ^([^/]*)/([^/]*)/([^/]*)$ index.php?lang=$1&page=$2&t=$3 [L]
RewriteRule ^([^/]*)/([^/]*)/$ /index.php?lang=$1&page=$2 [L]
RewriteRule ^([^/]*)/([^/]*)$ index.php?lang=$1&page=$2 [L]