php - How to avoid duplicate content? redirect 301/404? -


lets have link: http://www.domain.com/content/view/1/seo-url

now, lets user misspeled link - http://www.domain.com/content/view/1/seo-urll

now, dont want him 404 page, want redirect him right page right seo url, - dont want create duplicate content (on google's side).

what do?

header("...."); header("location: righturl"); 

303 see other, i'd say. either or canonical url in <meta /> tag.

actually i'm in doubt since 302 referred 302 found [elsewhere]:

it example of industry practice contradicting standard http/1.0 specification (rfc 1945), required client perform temporary redirect (the original describing phrase "moved temporarily"), popular browsers implemented 303 see other, i.e. changing request type regardless of had been originally. therefore, http/1.1 added status codes 303 , 307 disambiguate between 2 behaviours.

(wiki)


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -