Jump to content

Friendly URL contains non-English character didn't work in IPS 4 while working in IPS 3.4.8. Why? (Windows Hosting)


Foolboy

Recommended Posts

Posted

Hello everyone!

I would like to upgrade my community from IPS 3.4.8 to IPS 4 and currently working on a test environment. I successfully converted everything with no issue (thanks to this topic) and performing on the rest of forum configurations and settings when I encountered an issue regarding to the Friendly URL. (FURL)

The issue is when I trying to navigate the FURL contains non-English character, like these example below:

http://www.example.com/profile/1234-โปเกม่อน

http://www.example.com/topic/1234-Pokémon

it will always result in one of these cases:

- "This webpage has a redirect loop - ERR_TOO_MANY_REDIRECTS" Error on Google Chrome

- "Sorry, there is a problem - Cannot find the page you requested - Error code: 2T187/2" Message on IPS

However, these non-English FURL is working perfectly on my live community running on IPS 3.4.8.

I understand that IPS does not provide a technical support relating to the Windows Hosting configuration so I did managed to setup a FURL on IPS 3.4.8 by myself. But why the same configuration does not worked with IPS 4? Does that mean there is any change in FURL function between IPS 3.4.8 and IPS 4? 

Thank you in advance for your support.

Below is the configuration information of my live / testing community

Live Community IPS 3.4.8

Test Community IPS 4.0.9.2

All Community are using the following environments and settings:

IIS 8.5 on Windows Server 2012 R2 Standard

PHP 5.4.20

MySQL 5.6.24

Please see the FURL setting of live and test community in attached pictures.

furl_new.png

furl_old.png

Also, these communities using the same web server configuration (web.config) in order to activate the URL rewrite function as follows:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <system.webServer>
    <directoryBrowse enabled="false" />
    <defaultDocument>
      <files>
        <clear />
        <add value="index.html" />
        <add value="index.php" />
      </files>
    </defaultDocument>
    <httpProtocol>
      <customHeaders>
        <clear />
      </customHeaders>
    </httpProtocol>
    <httpErrors errorMode="Custom" existingResponse="Auto">
      <remove statusCode="404" subStatusCode="-1" />
      <error statusCode="404" path="/" responseMode="Redirect" />
    </httpErrors>
    <security>
        <requestFiltering allowDoubleEscaping="true" />
    </security>
    <rewrite>
        <rules>
            <rule name="IPB Friendly URLs" stopProcessing="true">
                <match url=".*" ignoreCase="false" />
                <conditions logicalGrouping="MatchAll">
                    <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
                    <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
                </conditions>
                <action type="Rewrite" url="/index.php" />
            </rule>
        </rules>
    </rewrite>
  </system.webServer>
</configuration>
Posted

I'm following this topic because I had a similar problem with my letters ÆØÅ æøå - when converting from 3.4.7 to 4.0.x. That was with the videos and Group Collaboration app. 

Instead of having gc/{#id}-{?} as Friendly URL - I changed it to gc/gc/{#id}-{?}. Might be necessery to do with GC Category as well. (ACP  - System - Advanced Configuration - Friendly URLs- http://www.yourdomain.no/gc/gc/id-?? ) 

The same with videoapp - changed from videos/view-{#id}-{?} to videos/video/{#id}-{?}

By doing these changes they are working now

Posted

I still unable to resolve this issue. I do not want to resolve this issue by just moving my community to the Linux hosting. (because I have many custom web apps that are written on ASP.NET and using the community database) 

Does anyone could guided me on this? Thank you in advance.

Posted

YAY! I managed to resolve this issue by myself! Although I did not received any help from here but thanks anyway.

It is appeared that IPS 4 did not passed the UNENCODED_URL variable to the IIS HTTP Request URI properly. I have to manually passed this variable by PHP code.

Open the index.php on the forum root and add this code.

if ( isset($_SERVER['UNENCODED_URL']) ) {
$_SERVER['REQUEST_URI'] = $_SERVER['UNENCODED_URL'];}

so it would look like this on the index.php file.

<?php
/**
 * @brief		Public bootstrap
 * @author		<a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
 * @copyright	(c) 2001 - SVN_YYYY Invision Power Services, Inc.
 * @license		http://www.invisionpower.com/legal/standards/
 * @package		IPS Social Suite
 * @since		18 Feb 2013
 * @version		SVN_VERSION_NUMBER
 */
if ( isset($_SERVER['UNENCODED_URL']) ) {
$_SERVER['REQUEST_URI'] = $_SERVER['UNENCODED_URL'];}

$_SERVER['SCRIPT_FILENAME']	= __FILE__;
require_once 'init.php';
\IPS\Dispatcher\Front::i()->run();

Problem solved! :thumbsup:

Posted

You could get away with putting that at the end of conf_global.php actually, which would save it getting overwritten on upgrades. :)

Sweet! Thank you very much for your advise. :wub:

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...