Quantcast
Channel: Active questions tagged header - Stack Overflow
Viewing all articles
Browse latest Browse all 795

PHP header redirect 301 - what are the implications?

$
0
0

I have example.com. If the user is logged in, it should load automatically example.com/option-X where X is a predefined choice of the user.

So, I do this at the top of index.php:

header("Location: /option-X");

But, if the user is not logged in, I just choose automatically the first option like this:

header("HTTP/1.1 301 Moved Permanently");header("Location: /option-a");

So, I have two questions regarding the implications of doing so:

  1. Since the search engines crawlers won't be logged in, they will always get example.com/option-a - does it affect them that it has a 301 header?
  2. What could be the server cpu load of doing those redirects? I don't know how to make a test out of it. The current site (which has no redirects) has about 100k daily visits.

Viewing all articles
Browse latest Browse all 795

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>