Jump to content

index.php in address bar when going to domain with www.


Blurky

Recommended Posts

Hi,

Just a quick question.

On my website, when starting the url with www., /index.php is appended to the end, even though it is being redirected to https:// with no www. at the start

For example,

http://www.domain.com, www.domain.com and https://www.domain.com all lead to https://domain.com/index.php 

while

http://domain.com, domain.com and https://domain.com all lead to https://domain.com

I have a redirect in my .htaccess that redirects all of the above to https://domain.com however those starting with www. append index.php (or rather don't hide it).

It's minor but if I'd like to sort this out in case it causes any SEO issues.

Link to comment
Share on other sites

4 hours ago, bsmither said:

I cannot speak to SEO, but the codebase has way too many instances of using index.php, both in pattern matching and URL generation, to be practical in any attempt to suppress them all.

It is a good idea to choose one single url for the homepage and redirect all other possible versions to that - otherwise you have possible duplicate content issues - my preference is https://www.domain.com but you can also choose https://domain.com (if using the www. is good enough for Google, then ....)

It is perfectly possible to setup a 301 redirect to remove the /index.php and it is something we do for our own sites and also on all client sites - for example for https://www.cubecart-demo.co.uk

What is actually used in the .htaccess depends on the configuration of your webserver

Ian

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...