Gossamer Forum
Home : Products : Gossamer Forum : Discussion :

redirecting index.htm to gforum

Quote Reply
redirecting index.htm to gforum
Sorry to ask this again, but I searched all the threads and tried all the solutions, neither worked.

I would like to have the myurl.com/index.(s)htm(l) files be forwarded to the cgi-url of gforum.

I tried this with .htaccess and DirectoryIndex which did not work since the links inside gforum were broken (one directory up). The I tried the <exec cgi> which had the same problem.

How to do ? The funny thing is, the DirectoryIndex works just fine with other complex cgi apps on other servers of mine. None of these has the directory-up problem. Why and how to ? Any help greatly appreciated !
Quote Reply
Re: [blackjack] redirecting index.htm to gforum In reply to
DirectoryIndex specifies which index files in a directory are loaded when leaving out the file name. It doesn't do a redirect.

You either need to create a re-write rule, or the easiest way is to just adda meta refresh in the index file.
Quote Reply
Re: [Paul] redirecting index.htm to gforum In reply to
I did a meta refresh by now. The disadvantage is that you need to load a wasted page which shows blank for a second.

I run a different site with a shop system and it is being DirectoryIndexed to that cgi file. At that site I do not have the trouble with the directory up. Maybe that shop is using complete urls instead of relative path inside its perl code ?
Quote Reply
Re: [blackjack] redirecting index.htm to gforum In reply to
> Maybe that shop is using complete urls instead of relative path inside its perl code ?

Yes, most probably. All the links in GForum are just <a href="gforum.cgi"?....">, so this explains why you are having problems.

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] redirecting index.htm to gforum In reply to
Is it possible to change the links to absolut pathes ? How ?
Quote Reply
Re: [yogi] redirecting index.htm to gforum In reply to
Oh, yeah!

All of our toolbars point to /forum/index.html, which has a server-side include to the forum app. When I switched us over from Web Crossing to GF last week, I changed the server-side include on that page to point to gforum.cgi's path in cgi-bin.

And promptly started getting 404s because I'd forgotten that inside GF pages, it seems to always be just "gforum.cgi". Solution: Open up all the relevant template files in HomeSite, then use its global search-and-replace to change that to an absolute path.

So humble suggestion for Ver. 2.0: Change references to gforum.cgi to $cgi-path/gforum.cgi (or whatever the exact variable is).
Quote Reply
Re: [agaffin] redirecting index.htm to gforum In reply to
Hi:

I think the CLEANEST way is to use mod_rewrite. Obviously, you need to do the above, so the .cgi file is treated as a valid homepage...

then I added this into .httpd.conf:

RewriteEngine on

RewriteRule ^/?$ /forum/ [PT]

Obviously, your paths may bge different.

The beauty of this is that you can "promote" your forum at the base url (in my case, http://forum.bcdb.com/) and that "invisibly" gets rewritten to /my/base/directory/forum/... and then, since you have set up gtforum.cgi as an index page, that is what get's called (/my/base/directory/forum/gtforum.cgi) but the user thinks it is http://forum.bcdb.com/!

Beautiful!

Since I can access and edit httpd.conf, I have not explored .htacces versions of this rewrite. But I THINK that is you have nod_rewrite enabled on your server, you can do sopmething similar in .htaccess.

Good Luck!
dave

Big Cartoon DataBase
Big Comic Book DataBase