URL redirection problem
Hello,
Google search engine post results of old URLs of my website, after some readings, Google remove URLs with 404 Not Found from indexing.
My websites are redirecting all none found links to 404 Not Found unless the link contain index.php
e.g. www.domain.com/asdasda redirect to 404 Not Found, good
but
e.g. www.domain.com/index.php/asdadasd redirect to home page instead - This is a problem, Search engines keeps those wrong URLs as valid.
All my websites hosted on my VPS server have the same problem.
Need some help please, I have people who search for product A on Google, end up at home page instead of product page.
-
Hello @psytanium, Can you let us know the contents of the .htaccess file in the document root of this website? Ensure to paste the output in CODE tags and replace real domain names with examples. Thank you. 0 -
Hello @psytanium, Can you let us know the contents of the .htaccess file in the document root of this website? Ensure to paste the output in CODE tags and replace real domain names with examples. Thank you.
All my websites have the same problem this link, check example.com/index.php please, this account dont have any .htaccess file, try this link example.com/index.php/test, it should result a 404 Not found, right ? Thanks :)0 -
Support Request ID is: 10606215 0 -
Support ticket conclusion: "it appears your issue is specific to how PHP query strings are handled. When loading a PHP file through the Apache service, any characters after the file are handled as query strings. This is the default behavior in the Apache service and allows for PHP query string support." So any server running Apache, have the same behavior. 0 -
Hello @psytanium, Thank you for sharing the solution. Additionally, here are a couple of links for reference: PHP: http_build_query - Manual RewriteQueryString - Httpd Wiki Thank you. 0 -
this htaccess helped redirect my URLs properly, if someone have this situation: RewriteEngine On RewriteRule ^index\.php/(.*)$ http://%{HTTP_HOST}/$1 [R=301,L]0
Please sign in to leave a comment.
Comments
7 comments