[HOW-TO] Configure a Redirect

Tutorials for the UnrealEd(itor) 2.5, which apply to LOTD, UT2003 and UT2004, and other games based on the same Engine.
Post Reply
User avatar Romania
Dragosvr92
Administrator
Administrator
Posts: 1128
Joined: 11 Sep 2009, 06:04
Name: Dragoș-Valentin Rădulescu
Location: Romania
Age: 32
Contact:

[HOW-TO] Configure a Redirect

Post by Dragosvr92 »

  1. Set your server to use a web redirect
  2. Force download of LOTD files
  3. Solve Invalid url errors
  4. Make Redirect urls case-insensitive
  5. Block Your Redirect view
  6. Redesign your Redirect page
  7. Create a local redirect
  8. Fix file mismatches
01. Set your server to use a web redirect
As DeepImpact provided the changes for the server.ini setup, ill quote his instructions bellow.
DeepImpact wrote: OPEN and EDIT The SERVER.INI

** SET AllowDownloads=False
* AllowDownloads=True Allows downloading of files from the Game Server.
As it is slow as dial up downloading from the server. You want this set to false so it uses your redirect.

** DownloadManagers=Engine.ChannelDownload
ADD DownloadManagers=IpDrv.HTTPDownload below DownloadManagers=Engine.ChannelDownload.
This sets the download manager to download from your http redirect.
Without this.. your redirect will never work. A Default server ini Does Not have this setting.

** RedirectToURL=http://
Set this to your redirect http URL http://To-your-redirect-url.
(All map files on a redirect are in one location. not individual folders. as it is on a game server.)

* ProxyServerHost=
* ProxyServerPort=
* UseCompression=False
Lotd doesn't use compression. As by default it is already set to false.

02. Force download of LOTD files
Sometimes, the server doesn't know how to serve a file, so it just displays its contents, like a .txt file.
To fix this, we will have to define all lotd file extensions so they start downloading when you click them, instead of showing you their contents. In the root of your redirect, create a file called .htaccess with the following text.

Code: Select all

AddType application/octet-stream .ukx
AddType application/octet-stream .uax
AddType application/octet-stream .dz
AddType application/octet-stream .usx
AddType application/octet-stream .utx
AddType application/octet-stream .u
03. Solve Invalid url errors
The error usually means that the necessary file the map needs does not exist on the server....... or it exists under a different spelling.
Read the next tutorial to fix that.


04. Make Redirect urls case-insensitive

In terms of webservers, urls are all by default case-sensitive.
That means that you can have InTrinDay_TX.utx and INTrinDay_TX.utx in the same directory.
Some mappers didn't respect the case in their filenames, so players will get an "Invalid url" error.

To fix this you can use the three line code bellow but only if you have mod_speling enabled on the redirect server.
If you host the redirect from your PC or a VPS, you have full access and can enable it yourself.

Okay so, make sure the mod_speling/speling_module is enabled in Apache and add this inside the .htaccess of your root directory.

Code: Select all

RewriteEngine on
CheckSpelling on
CheckCaseOnly on
Restarting Apache or editing the httpd.conf file with those lines in may be required. But for that you will need to do more research on the web.


If you host your redirect from a free or shared web host, The best alternative solution is to specify each wrongly named file to its real name with the code bellow added in the .htaccess file. I will update the list bellow each time i will find a wrong cased file that causes an Invalid url, but if you find one yourself, you can add it to your list and let us know so we could update the list :) All redirect owners should make use of this fix.

Code: Select all

#Wrong name requested by redirect => Right Name, found on disk.
RewriteEngine on
RewriteRule ^mp5hk\.u$ /MP5HK.u [L]
RewriteRule ^Landlord\.u$ /landlord.u [L]
RewriteRule ^machete\.utx$ /Machete.utx [L]
RewriteRule ^InUGSewers\.u$ /INUGSewers.u [L]
RewriteRule ^MP5HKanim\.ukx$ /mp5hkanim.ukx [L]
RewriteRule ^AK-74V2Anim\.ukx$ /AK-74V2anim.ukx [L]
RewriteRule ^InTrinDay_TX\.utx$ /INTrinDay_TX.utx [L]
RewriteRule ^Mossberganim\.ukx$ /mossberganim.ukx [L]
RewriteRule ^EM_RunTime_S\.usx$ /EM_Runtime_S.usx [L]
RewriteRule ^EM_RunTime_T\.utx$ /EM_Runtime_T.utx [L]
RewriteRule ^machetersounds\.uax$ /macheteRsounds.uax [L]
RewriteRule ^Mossbergsounds\.uax$ /mossbergSounds.uax [L]
RewriteRule ^BDCrossbowSkins\.utx$ /bdcrossbowskins.utx [L]
RewriteRule ^dawnhumantextures\.utx$ /DawnHumanTextures.utx [L]
05. Block Your Redirect view
There are a few ways to disable the directory index for visitors.
  1. Add this text (Options -Indexes) in a .htaccess file.
  2. Create an empty file named index.html into your redirect root.
This will just show them a blank page. If you want to display an error message, follow instructions in this topic.


06. Redesign your Redirect page

... Coming soon.

07. Create a local redirect

... Coming soon.

08. Fix file mismatches
While mismatches are most commonly known to appear between the server and the player.
They also happen between the server and the redirect. So if you are getting a mismatch, even though the server file and the one you have are the same size. Check if the redirect file is what it should be... Sometimes, some ftp programs upload the files in a bad transfer type.


If you have any questions dont hesitate to ask.
You're welcome ;)
Formerly known as TheKiller
User avatar United States of America
DeepImpact
Server Admin
Server Admin
Posts: 83
Joined: 27 May 2013, 02:08
Age: 47
Contact:

Re: [HOW-TO] Configure a Redirect

Post by DeepImpact »

* Redirect usage for an online lotd game host..
* A redirect is a file host that stores your lotd game files for a faster download.
* The lotd game is limited to 10kb download speed. It's why you need a redirect.

* * Setting the Server.INI for use with a http redirect. * *

; DownloadManagers=Engine.ChannelDownload (Default Setting: For downloading from game server Not from a redirect.)
* 1: DownloadManagers=IpDrv.HTTPDownload ( Use this when using an http Redirect. )

* 2: RedirectToURL=http://Put_your_redirect_url_here
(All Game Files go into ONE folder / or directory on the Redirect.)

* 3: AllowDownloads=False (You want this to be False for using an http redirect.)
(Setting this to true means it will download the files from the game server itself.. and NOT from the redirect.
and downloading files from the game server itself is major slow. 10kb. It's why you want to set up a redirect.)

ProxyServerHost= (Leave blank unless otherwise told to change it.)
ProxyServerPort= (Leave blank unless otherwise told to change it.)
UseCompression=False (Default Setting: Lotd does not use compression. So default False.)

Those are the three main settings that I had to change in order to get my redirect to work.

Note: In the server.ini. you can Semicolon out anything you do not want to function.
; DownloadManagers=Engine.ChannelDownload (; will not execute. ignored.)
DownloadManagers=IpDrv.HTTPDownload (will execute.)

Ok.. hope that helps somebody.. :)
Post Reply