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
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");
Related
I see documentation in https://docs.joomla.org/Creating_a_Custom_404_Error_Page
but the custom 404 error page doesn't make change the Google Search Console requirements, because Joomla normally redirects to 404 soft page and result code HTTP 200 OK, but it's necessarily return 404 code in protocol status code level.
How can I configure or change Joomla CMS to return 404 status code in HTTP?
A major issue in Joomla when it comes to SEO is that it doesn't return a 404 HTTP code on 404 pages, and this results in the "soft 404" errors in the Google Search Console. The right way to handle this problem is to return the 404 HTTP response in your error.php file as described here. This will ensure that your 404s are real 404s. The weird thing is that Joomla, by default, does know when there is a 404, but it returns a 200 OK instead.
I am working on odoo 10. What i want to do is simply show 404 page like we show in other website if the requested page doesn't exist.
I am sending email to client and in that email template there is a link to record but some times users with upper user roles deletes that specific record due to some reason. I want to show 404 page in this case.
You can just return website page 404 according to our condition.
return request.render('website.404')
I'm having a issue and i'm trying to understand if this is possible.
My website is redirecting all the requests from http to https from AppServiceProvider.
The problem is that the 404 page is redirecting to homepage and i get two 301 redirects as follows:
http://url.com/some_unexisting_page (301 to) > https://url.com/some_unexisting_page (301 to) > https://url.com (200)
So instead of displaying the 404 page at https://url.com/some_unexisting_page i'm doing another 301 redirect to homepage.
My questions is if its possible to skip the 2nd redirect and go from http://url.com/some_unexisting_page (301 to) -> https://url.com
Thanks
I am not familiar with Laravel. But the redirect in question is definitely possible using Apache redirect or using Netflix Zuul.
I am using Magento Enterprise Edition 1.12.0.0 for my online shop.
When I am accessing a 404 url such as http://www.example.com/badpageurl then it is showing 404 no-route page with HTTP STATUS as 200 OK. Whereas it should show it as 404 not found as HTTP STATUS. Not sure what is worng, because I did no changes in code and configs.
Can anyone please help and let me know how I can fix this issue.
I have an SEOmoz account PRO and after adding the campaign and few days, crawls stats came in and with that 10k 302 redirects that shouldn't be there, there are URLS like compare product pages, enable-cookies URLs, etc. which are right now 302 that I need to get to 301. I am using magento 1.6 and on another store with 1.7 version of magento both have the same issue.
I actually followed this :
app/code/core/Mage/Core/Controller/Response/Http.php
But there is no 302 or 301 on that file what should I do? I have like 10,000 redirect crawl errors which needs to be 301 they are currently 302.
Check your cannonical url settings. Maybe MOZ massed out when see cannonical url errors.