Reputation: 86
E-Commerce website has product page and category page. Now when user visiting any product and if not available then user will redirect to category page with 302 header status code of product page, I want to change that from 302 to 200, How can I make that possible ?
In short, How can I change http header from 302 to 200 ok in PHP
Upvotes: 0
Views: 1681
Reputation: 647
If you add the following option at the top of a PHP file before any output then it will change the status to 200.
header("HTTP/1.0 200 OK");
Upvotes: 2