psytanium

Well-Known Member
Jun 6, 2014
275
13
68
Lebanon
cPanel Access Level
Root Administrator
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.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,222
463
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.
 

psytanium

Well-Known Member
Jun 6, 2014
275
13
68
Lebanon
cPanel Access Level
Root Administrator
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 :)
 
Last edited by a moderator:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,222
463
Hello @psytanium,

I'm not able to reproduce this behavior using the default Apache configuration on a test system. Can you open a support ticket so we can take a closer look at the server and see how Apache is configured? You can post the ticket number here and we will update this thread with the outcome.

Thank you.
 

psytanium

Well-Known Member
Jun 6, 2014
275
13
68
Lebanon
cPanel Access Level
Root Administrator
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.