Topic on Project:Support desk

Jump to navigation Jump to search
Tofiq Kərimli (talkcontribs)

I have developed a mobile version for my site. But some features are not working. For example, on my computer, Google Chrome opens a mobile version. But Microsoft Edge does not open. Only the mobile version opens on the phone. Unable to open Desktop version.

I wrote this in the LocalSettings.php:

$wgMFAutodetectMobileView = true;

$wgMobileUrlTemplate = 'm.wiki.sheki.site';


Apparently I made a mistake somewhere. Can you help me?

Thanks in advance.

Tofiq Kərimli (talkcontribs)

I solved some of the problems myself.

I wrote this in the LocalSettings.php:


$wgMFAutodetectMobileView = true;

$wgMobileUrlTemplate = 'm.wiki.sheki.site';

# desktop domain set req.http.x-wap = "yes";

# mobile domain set req.http.host = "wiki.sheki.site";


Now I have only 1 problem: Only the mobile version opens on the phone. Unable to open Desktop version. Apparently I made a mistake somewhere. Can you help me?

Thanks in advance.


AhmadF.Cheema (talkcontribs)

Instead of actually setting up the sub-domain m.wiki.sheki.site, are you using some redirects to redirect visitors from m.wiki.sheki.site to wiki.sheki.site?

If so, maybe that's the issue.

Tofiq Kərimli (talkcontribs)
Tofiq Kərimli (talkcontribs)

It is now being written: 502 Bad Gateway.

AhmadF.Cheema (talkcontribs)

If you remove m.wiki.sheki.site subdomain, then you'll have to remove $wgMobileUrlTemplate too.

Tofiq Kərimli (talkcontribs)

Yes, I did. Do you think I should delete that subdomain? Was there another version?

AhmadF.Cheema (talkcontribs)

The site is working on my end. The mobile and desktop versions are changing fine.

Tofiq Kərimli (talkcontribs)

Now everything is in order. But I wanted the mobile version to open in the m.wiki.sheki.site subdomain. Is it possible to achieve this?

AhmadF.Cheema (talkcontribs)

You can try this, don't know if it will work though.

Tofiq Kərimli (talkcontribs)

I have two questions:

1. Where to write this code? LocalSettings.php?

2. Should I restore m.wiki.sheki.site subdomain?

AhmadF.Cheema (talkcontribs)
  1. In .htaccess file.
  2. Probably.
Tofiq Kərimli (talkcontribs)

Again, I have questions.

I have 2 htaccess files.

1. /public_html/sheki.site/.htaccess and /public_html/wiki/.htaccess; which of them would I add?

2. RewriteCond %{HTTP_HOST} ^(www\.|)de\.m\.mywiki\.de$ [NC]..., - should the word "mywiki" be changed here?

Reply to "Mobile version"