Author Topic: index.php default file  (Read 8955 times)

0 Members and 1 Guest are viewing this topic.

acherwinski

  • Full Member
  • ***
  • Posts: 18
index.php default file
« on: July 16, 2020, 04:27:53 PM »
I am trying to get my public /chat to open directly at the url https://chat.mydomain.com .  As setup it will not work. Nor does https://chat.mydomain.com/chat

It will work with https://chat.mydomain.com/index.php/chat .   The host says the server is set to default to index.php

https://chat.mydomain.com/index.php  routes to  https://chat.mydomain.com/index.php/operator/login

Can this be configured in the configs/routing.yml file?

I would like https://chat.mydomain.com to hit the public chat window and https://chat.mydomain.com/operator to hit the backend login.

Version 3.2.7

Thank you,

acherwinski

  • Full Member
  • ***
  • Posts: 18
Re: index.php default file
« Reply #1 on: July 16, 2020, 06:42:14 PM »
The support person at the hosting looked at the issue and reports:

"I reviewed the issue, there is no problems with the "configs/routing.yml" files, the paths in this file are correct and only route "operator/login" "/chat" as indicated by the application.

The .htaccess configuration for Apache is also not causing the issue, so the problem is occurring somewhere in the backend of the site configuration. I am was not able to find where these settings would be located as I am not familiar with the site code."

faf

  • Mibew Staff Member
  • Native
  • *****
  • Posts: 951
    • Mibew Messenger
Re: index.php default file
« Reply #2 on: July 17, 2020, 07:59:52 AM »
Frankly, I'm unable to understand what is the issue you're talking about. If you want to implement your own set of routes, take a look at Symphony docs.

acherwinski

  • Full Member
  • ***
  • Posts: 18
Re: index.php default file
« Reply #3 on: July 17, 2020, 05:40:07 PM »
Hello faf,

I've installed the mibew application (including the index.php) in directory X.

I  pointed subdomain A record in the DNS to the IP

The server (IP) points the subdoman to the directory X.

That should launch the index.php

For some reason the index.php must be include in url to get it to work.

The equivalent of https://mibew.org/ not working, but requiring https://mibew.org/index.php






faf

  • Mibew Staff Member
  • Native
  • *****
  • Posts: 951
    • Mibew Messenger
Re: index.php default file
« Reply #4 on: July 20, 2020, 11:06:49 AM »
Looks like it's something related to your server environment and its settings. Maybe something wrong with mod_rewrite... It's impossible to say anything more concrete without access to system settings, server logs, etc.

acherwinski

  • Full Member
  • ***
  • Posts: 18
Re: index.php default file
« Reply #5 on: July 20, 2020, 07:55:55 PM »
Thank you faf,

The hosting company support made the following updates that got it work more like expected.

added the following to the .htaccess file.

RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

The rewrite rule is re-writing the index.php file as base directory and https://livechat.domain.ca url is now loading operators login normally.  https://livechat.domain.ca/chat is now loading the chat window.

It would be great to get the shorter url (https://livechat.domain.ca) to work as the public chat window url.



faf

  • Mibew Staff Member
  • Native
  • *****
  • Posts: 951
    • Mibew Messenger
Re: index.php default file
« Reply #6 on: July 21, 2020, 10:35:02 AM »
The official distribution of Mibew Messenger contains valid .htaccess file. And it works fine when Mibew Messenger available at the root of a site. See https://demo2.mibew.org for example. One can make any modification to that .htaccess but only on its own risk.

As of "public chat window url", frankly I don't get why do you need that. Given the fact that normally visitors doesn't see any urls at all since the chat window is in iframe. But I've already told you that you can try to implement your set of routes.