Javascript window.location seen as 301 by SEs?
Deeeeeeee
the Americas
Which of these is best? Do any/all break the "link juice" flow? Do these count as 301s?
window.location = "htt p://website.com"; window.location.href = "htt p://website.com"; window.location.assign("htt p://website.com"); window.location.replace("htt p://website.com");<br>
((Maybe I should redirect with .htaccess instead if JavaaScript is not a surefire way of transmitting link weight? It's just that I am not sure how to go about this using apache...
As I have it, PHP logic tests for the COMPLETE URL in PHP, after apache makes all requests appended to index file:
<IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php [QSA,L] </IfModule>A test fot exact URLs go first in the PHP code, and then, if no flag is set for "exact page" AND then there's a positive test for a partial match, it then redirects. It now works, but is this OK for SEO?))
I at first tried doing the redirect on partial match in PHP, but didn't work. Not sure why. Maybe headers already sent? Have error logging not echo'ed to screen and didn't check. That's why I am using JS. Just waiting to see what you guys think before I waste more time doing this and then having to re-do.
What about META refresh in HTML? Does that transmit link power?
Comments