Home directs to website.com/index.php in the menu.
/contact directs to website.com/index.php/contact.
I have to input the whole URL to bypass index.php from inserting itself before the desired page: Https://website.com/contact. If I log in I get directed to website.com/index.php/user/ if I click on the "my account" I get directed to website.com/user/ what would cause this? I thought it was pathauto or drupal8.0.3 because it happened around 8.0.3
Some links are unable to be changed like hitting the home logo. Please hell determine the cause of this anomaly.
Comments
Comment #2
sourabh.singhal commentedHi sushichris,
I am not able to produce this issue on my side, it seems perfectly working on my side, i have tried all the cases which you mentioned in description.
Will you explain more exactly, when or where you will be getting this issue.
Thanks
Sourdrup
Comment #3
cilefen commentedMore information is needed in order to work on this issue. Is the problem confined to menu links? Are there error messages? Is mod_rewrite configured properly? What web server is in use? Are any menu-related contrib modules in use?
Comment #4
sushichris commentedHi guys thanks for responding, I am not sure what is causing this, originally I thought it could be pathauto but now I am not so sure. I am only getting this issue on one site. I will probably be reinstalling to be rid of this issue, I was hoping to establish the cause because this has been driving me nuts since 8.0.3
So in the menu settings I disable the default home link, I have to as there is no way to change the url destination like when creating a custom menu link. Resulting in mysite.com/index.php/
Same with the default contact link. It can't be edited so I disable and create a new one with https://mysite.com/contact as the destination because just putting /contact will result in https://mysite.com/index.php/contact
As for the mod_rewrite I haven't really changed anything except for uncommenting the following:
And changed this from [F] to [T] so as to access mysite.com/subdirectory:
RewriteRule "^(.+/.*|autoload)\.php($|/)" - [T]I hope this is useful
Comment #5
liam morlandI am having this problem as well. I see it on many places links appear: menus, breadcrumbs, tabs. One place it does not appear: If I am on
admin/config, the links to the various config pages do not haveindex.php. Note that this is notindex.php?q=path; that would be a matter of clean URLs not working. The problem is that links to a page likeadmin/peopleappears asindex.php/admin/people. If I edit the URL bar to removeindex.php/, the page loads, but still contains faulty links to other pages. I don't have any menu modules installed.Comment #6
gmrossello commentedFor our project we are having also problems with /index.php/ in the url.
In our case, problems appear only in the production environtment. The only differences in this environtment are:
- Two machines are running drupal instances and a Load Balancer is distributing the traffic between them.
- The ssl connection, that os configured in the Load Balancer server.
The machines are working on a centos 7 with a 7.28 version of php.
The AllowOverride All for the correct directory was changed in the httpd configuration file.
In some places, is mentioned that the possible cause of the is in the ssl conf file for the secure site:
https://www.drupal.org/forum/support/installing-drupal/2009-03-10/ssl-an...
https://www.drupal.org/node/475730#comment-1726870
But in our case, the one that has this configuration is the Load Balancerthe, not the production machines.
Someone found a solution for this issue?
Comment #7
travellerconThis is kinda a big deal.
In my case I can remove it with clearing the cache. However, when people add new content, it can pop back up, seemingly randomly.
So I have to run an agent to look to index.php appearing in links and then text me so I can rebuild the cache.
If I were a better coder I would fix it. Alas I am not.
Comment #8
wtuvell commentedSee my recent re-finding of this issue, at https://www.drupal.org/project/drupal/issues/3054451.
Comment #9
wtuvell commentedRe-checking in on this again this morning, I'm seeing that the problem has disappeared for all browsers I'm trying, except for Vivaldi (which is my first/main choice). I think I'll talk to them.
Comment #10
derherrberger commentedHi guys,
we're struggling with exactly the same issue on two up-to-date, multilingual Drupal-8 sites (many other d8, multilingual sites don't have the issue):
* both sites have completely different Hosting-Environments
* most of the time all URLs in the menus appear correctly
* then randomly URLs with /index.php/url-alias appear for example on the logo home link, but also in some of the menus
* the issue affects all URLs in one menu, but not all menus on one page.
After trying to fix the bug, clearing cache, running cron etc. all URLs are rendered correctly, then randomly the index.php URLs reappear, e.g. after switching the language.
Comment #11
kscheirerBumping this to major, at least until we understand what's causing this.
I'm experiencing the same symptoms on a D8.7.1 site hosted on Pantheon. That means nginx instead of apache, and no config changes are possible from their normal hosting setup.
Most of the time links are correct, but when using the "Contextual edit" links or clicking the site logo it sometimes starts. It is intermittent behavior, seems related to cache based on reports above.
I don't have concrete steps to reproduce yet, but will keep investigating. Seems like this issue was dormant until ~3mo ago with 8.6.9, perhaps a regression introduced around that time?
Comment #12
rewted commented@kscheirer some additional observations in my thread. I'd agree with the timeline, seemed to have started in the past few months, I am currently at 8.7.3
Comment #13
kscheirerUpdated to latest dev
Comment #14
dawehnerThis issue and https://www.drupal.org/project/drupal/issues/483150 feels like they should be solved together potentially.
Comment #15
cilefen commentedComment #16
waelk78 commentedI have the same problem today and semrush is considering the extra /index.php/ as duplicate
Any news on how to fix it?
Comment #18
rewted commentedIn 8.8.1 I'm still seeing on the Frontpage View, the Pager links having ../?destination=/&_exception_statuscode=404&page=1 in the URL where as normally they will be ../?page=1
Clearing the cache they revert back to normal. Has anyone noticed this before or know the cause?
Comment #19
liam morlandI continue to occasionally have this problem and it is fixed by a cache rebuild.
Comment #20
andileco commentedI'm having this issue and it's very difficult to get rid of it. Clearing cache (from performance>clear caches) only occasionally removes it. I don't have Drush installed on my box.
I'm really appreciate any ideas that haven't already been mentioned.
We're using multiple containers with Apache servers and CloudFront.
Comment #21
andileco commentedOK, we were able to prevent index.php in our URLs by removing custom HTTP error handling from CloudFront - hope this helps others!
Comment #22
idebr commentedComment #27
quietone commented@sushichris, thanks for the report.
I have found several issues about index.php appearing in URLs. Even though this is earlier I am marking it as a duplicate of #3050261: index.php randomly appears in friendly URLs which has more discussion of solutions.
Thanks.
Comment #28
karenann commentedI have an occurrence of this and here's how it's happening.
I have a view page with a path /policies
I have the "Default front page" configured to be /policies
I have the page.html.twig set to expose page.breadcrumb
On the home page and /policies page, the Home breadcrumb is normal. On every other page, the Home breadcrumb is /index.php
Comment #29
eugenechechel commentedrun
drush cc renderComment #30
dewancodes commenteddrush cr did not fix the issue on LIVE server. Its working fine on DEV. It creates this issue on menu items where path is starting with '/'. If I use menu item path with 'https: // www. mysite .com', it works fine on those menu items.
Drupal: 11.2.10