My Solution to a Unique Install

Do you have suggestions how to improve myLounge Redirection? Want to give a feedback? Or even found a bug? Then please post in here.

Moderator: Scooby

My Solution to a Unique Install

Postby phxflyguy » Thu Dec 16, 2004 11:45 pm

Great script, Alex! Thank you for making this available free of charge.

Because I use PostNuke CMS on my site and changing the name of my index.php file messes up the rest of the site, I was unable to do a typical installation of the script. I also had one other problem that kept path forwarding from working. The path forwarding issue ended up not being a problem with my installation method or with the script but with good ol' Microsoft. Although it took me a while to figure out the workaround, it actually ended up being very simple. I thought I'd share my solution here so it may be of help to someone else.

For the script to work with PostNuke I had to make the following simple changes:

Change the name of the index.php file that comes with the myLounge script to whatever you want. I chose redscript.php. Then open the .htaccess file and change the contents to this:

Code: Select all
ErrorDocument 404 /redscript.php
DirectoryIndex redscript.php index.php index.html index.htm


Upload these files and the myred folder with all of it's contents to your root directory.

Configure and install normally making sure to enter index.php as your real startpage.

Done!

If you would like to use the script as a PostNuke module, you can do so by downloading CrossNuke Modulizer and following the easy instructions that come with it.

Now, the problem I had with path forwarding was when I tried to use any url that included a folder or file (i.e yourname.domain.com/file.html), I would get a 404 error instead of the script forwarding it to the correct site. This would only happen with IE. The reason this happens is because Microsoft is trying to do our thinking for us again.

What happens is Internet Explorer versions 5 and greater looks at the size of the 404 page to decide whether to display its own error. If your error page is 512 bytes or smaller, it displays it's own built-in 404 page. To get around this, all you have to do is make sure that the size of your file is greater than 512 bytes. This does not include graphics.

This is what I did and it's simple:

Open up the index.php file that came with the installation (now called redscript.php for me) and go down to around line 79 just after the <\head> tag. Insert comments here to make the size of this file bigger. I used this to add some invisible advertising. Something like this:

Code: Select all
<!--
This domain is provided by http://www.mydomain.com  MyDomain.com:: My Site Description.  Have an ugly web address?  Get your own free domain from www.mydomain.com and your address could look like this: yourname.mydomain.com
-->


Add as much as you need or want to here.

Hope this will be helpful to someone else with the same problems.
phxflyguy
Newbie
Newbie
 
Posts: 1
Joined: Thu Dec 16, 2004 10:55 pm
Location: Phoenix, Arizona

Return to Suggestions

Who is online

Users browsing this forum: No registered users and 5 guests

cron