Gossamer Forum
Home : Products : Gossamer Forum : Development, Plugins and Globals :

Search Engine Friendly Templates!

Quote Reply
Search Engine Friendly Templates!
Hi,

We've put together a set of template sets (well, 4 templates in total), that will allow you to present search engine friendly URL's! This will allow you to have your forum content archived by spiders, without having to go to the overhead of actually creating static html pages.

This requires mod_rewrite to work properly. You need to add the following rewrite rules to a .htaccess file or httpd.conf, and then add the attached templates to your templates directory.

RewriteRule ^/forum/.*P([0-9]+)/?$ /perl/gforum/gforum.cgi?post=$1&t=search_engine [L]
RewriteRule ^/forum/.*P([0-9]+)-([0-9]+)/?$ /perl/gforum/gforum.cgi?post=$1&page=$2&t=search_engine [L]
RewriteRule ^/forum/.*C([0-9]+)/?$ /perl/gforum/gforum.cgi?category=$1&t=search_engine [L]
RewriteRule ^/forum/.*F([0-9]+)/?$ /perl/gforum/gforum.cgi?forum=$1&t=search_engine [L]
RewriteRule ^/forum/.*F([0-9]+)-([0-9]+)/?$ /perl/gforum/gforum.cgi?forum=$1&page=$2&t=search_engine [L]
RewriteRule ^/forum/?$ /perl/gforum/gforum.cgi?t=search_engine [L]
RewriteRule ^/forum/.*gforum.cgi /perl/gforum/gforum.cgi?%{QUERY_STRING} [R,NE,L]


You can see a demo of this at:

http://gossamer-threads.com/forum/

Let me know what you think!

Cheers,

Alex
--
Gossamer Threads Inc.

Last edited by:

Alex: Jan 24, 2002, 6:34 PM
Quote Reply
Re: [Alex] Search Engine Friendly Templates! In reply to
Great idea, Alex!!! Wow!! Hope it will work on my server (did not try yet). Smile That will help a lot to index a site like mine which is 95% based on the dynamic pages of my forum.

How and when the static html pages are created? Each time there is a new post? Not sure to understand the way it works.

I found a little error: the "Jump to last post" doesn't work on the new category_list.html template.

Great idea!! I'm really impressed!! Wink

François

Last edited by:

Franco: Jan 27, 2002, 1:15 PM
Quote Reply
Re: [Franco] Search Engine Friendly Templates! In reply to
It's not static. The URL's are just made so they look static to search engine crawler.

Adrian
Quote Reply
Re: [brewt] Search Engine Friendly Templates! In reply to
This is what I was thinking. Smile

If all users use this kind of URL's as default does it put more load on the server than the standard URL's?

Thank you.
Quote Reply
Re: [Franco] Search Engine Friendly Templates! In reply to
Well, you have to have mod_rewrite for Apache installed. I'm not sure how much extra load it puts on the server (Alex can answer that). It's pretty much just translating the static looking urls into the gforum.cgi?do=... urls (as seen by the rewrite rules Alex posted).

Adrian
Quote Reply
Re: [brewt] Search Engine Friendly Templates! In reply to
I'm on Zeus (3.4). Is it possible to have mod_rewrite on Zeus? Or is there a similar module on Zeus who can make the same job? Unsure

Thank you.

François

Last edited by:

Franco: Jan 24, 2002, 9:52 PM
Quote Reply
Re: [Franco] Search Engine Friendly Templates! In reply to
Quote:
Zeus is a fast, scalable Web server. It has full clustering support to allow easy management of a large farm of Web servers. It includes FrontPage(tm) support, distributed server-side Java, 128bit SSLv3 encryption worldwide, unlimited virtual servers with groupable configuration, real-time statistics, bandwidth throttling, extensive logging options, Apache compatibility (including rewrite), and a Web-centric management interface. It supports application development in ISAPI, Java Servlets, secure CGI, FastCGI, NSAPI, and others.
Supposedly it does Wink I couldn't find anything useful on their site though.
There's this url:
http://www.zeus.com/...isapi/isapi-ex2.html
But it seems there's supposed to be a more elegant solution built in (from what I read). I've never touched Zeus, so I can't help you there.

Adrian
Quote Reply
Re: [Alex] Search Engine Friendly Templates! In reply to
What a great thing these rewrite rules. And thanks a lot for the templates!!

I am in the progress of implementing these new templates, actually I want to replace the old templates and only use the new templates.

My forum already resides in /forum/ so I had to change a few things in the rewrite rules.

1) If you want to use the new templates to replace to old ones, then make sure you add the globals of the new template (in globals.txt) to your own globals. You also need to change the rewrite rules a bit, e.g. the first line would be

RewriteRule ^/forum/.*P([0-9]+)/?$ /path/to/gforum.cgi?post=$1 [L]

and so on...

2) If your gforum.cgi already resides in the directory /forum/, you have to change the last line of the rewrite rules to:

RewriteRule ^/forum/.+gforum.cgi /forum/gforum.cgi?%{QUERY_STRING} [R,NE,L]

Note the plus sign instead of the multiplication sign (the multiplication sign results in an infinite redirection loop).

I hope that these remarks are helpful.

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [Alex] Search Engine Friendly Templates! In reply to
Jack

Great idea, but there seems to be a problem with the links to last posts. Haven't installed to my server yet but tried the ones in this forum.

They give 404.

That's the ones you click on the arrow to get.

At the end of those URLs it says :
Quote:
Unknown tag 'post_id'

Maybe something missing in the template?

I guess it is so - but it could be helpful if you specify which templates dir to put in. I assume the default one.
---
Kjell Knudsen
http://www.icbl.org
Quote Reply
Re: [Alex] Search Engine Friendly Templates! In reply to
I noticed that the feature 'Jump to first unread post' doesn't work with the search_engine templates.

Thank you.

François
Quote Reply
Re: [Franco] Search Engine Friendly Templates! In reply to
That's because they are generally meant to bring people to our website from a search engine; jumping to the last unread post specifically needs arguments passed in, but the search engine templates aren't capable of it.

Jason Rhinelander
Gossamer Threads
jason@gossamer-threads.com
Quote Reply
Re: [jagerman] Search Engine Friendly Templates! In reply to
So, if I use the search_engine templates as default (for all users), there is really no way to use the feature 'jump to the last unread post'?

Thank you.

François

Last edited by:

Franco: Jan 28, 2002, 9:52 PM
Quote Reply
Re: [Alex] Search Engine Friendly Templates! In reply to
I did not get it yet. I was looking for an tutorial at apache.org but I have no

understanding yet. I was trying to modify the htaccess to let my Detailed pages

from Links SQL appear in the same way. the .cgi is placed in the root, so I

tried to use ^/page.cgi.... to identify the url. But there is no difference in the results.

Does anyone know a ressource where I can read something about the rewrite rules.



Regards



Niko
Quote Reply
Re: [el noe] Search Engine Friendly Templates! In reply to
o.k. found it. I will post this in the LinksSQL Forum as well:
RewriteEngine on
RewriteRule ^news(.*)\.html$ /page.cgi?g=Detailed/$1&d=0
Quote Reply
Re: [Franco] Search Engine Friendly Templates! In reply to
The search_engine templates are meant to complement (and actually require) the default templates. As soon as you click "Main Index" in the search engine templates (or any of the other links at the top), you are taken out of the default templates and the last unread feature will work perfectly. These templates should be installed in admin/templates/search_engine. The .tplinfo file is important as well - it tells the template parser than any files not found in the search_engine templates should be pulled from the default template set.

Jason Rhinelander
Gossamer Threads
jason@gossamer-threads.com
Quote Reply
Re: [jagerman] Search Engine Friendly Templates! In reply to
Installed the templates and copy the rules into the .htaccess file place in the forum directory but encountered the following error :

Can't call method "data" on an undefined value at /path....../admin/GForum/Post.pm line 245.

Please advice
Quote Reply
Re: [Alex] Search Engine Friendly Templates! In reply to
Anyway to use this on IIS?


Realiiity.com Forums
Quote Reply
Re: [ellipsiiis] Search Engine Friendly Templates! In reply to
Good question, and one I'm waiting to see the answer to. Although I did note something crawling through the forums the other day, I'll have to check my logs and see what it was.

-Another hosted on IIS

Last edited by:

heavybombers: Feb 1, 2002, 12:41 PM
Quote Reply
Re: [heavybombers] Search Engine Friendly Templates! In reply to
Unsure
Quote Reply
Re: [Franco] Search Engine Friendly Templates! In reply to
In Reply To:
I'm on Zeus (3.4). Is it possible to have mod_rewrite on Zeus? Or is there a similar module on Zeus who can make the same job? Unsure

Thank you.

François


You've probably already got the answer to this but... Yes Zeus does have rewrite capability. In fact, in the Zeus control panel, you can paste in the Apache mod_rewrite rules in Apache syntax and Zeus will automagically translate it into it's own syntax.

If only Zeus wasn't so expensive :(
Quote Reply
Re: [paulj] Search Engine Friendly Templates! In reply to
Any word on IIS?


Realiiity.com Forums
Quote Reply
Re: [ellipsiiis] Search Engine Friendly Templates! In reply to
Hi,

No, unfortunately we don't have a similiar solution available for IIS. We're looking into it, but without mod_rewrite or a working PATH_INFO feature, it's quite difficult.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] Search Engine Friendly Templates! In reply to
I've installed Gossamer Forum in the /forum directory and uploaded the modified .htaccess file in the root directory so that /forum/gforum.cgi rewrites into /forum but I think nothing has changed... How can I enable this feature?
Thanks
Max
The one with Mac OS X Server 10.4 :)
Quote Reply
Re: [Alex] Search Engine Friendly Templates! In reply to
I don't know what the heck is wrong with me, but I just can't get this mod_rewrite thing to work. I've checked with my web host and they've assured me it's installed and enabled. I have installed the search engine templates, and I've got the following in an .htaccess file in my /site/support directory, which is the one I'd like to mirror the actual forum:

Code:


RewriteRule ^/site/support/.*P([0-9]+)/?$ /site/cgi-bin/support/gforum.cgi?post=$1&t=search_engine [L]

RewriteRule ^/site/support/.*P([0-9]+)-([0-9]+)/?$ /site/cgi-bin/support/gforum.cgi?post=$1&page=$2&t=search_engine [L]

RewriteRule ^/site/support/.*C([0-9]+)/?$ /site/cgi-bin/support/gforum.cgi?category=$1&t=search_engine [L]

RewriteRule ^/site/support/.*F([0-9]+)/?$ /site/cgi-bin/support/gforum.cgi?forum=$1&t=search_engine [L]

RewriteRule ^/site/support/.*F([0-9]+)-([0-9]+)/?$ /site/cgi-bin/support/gforum.cgi?forum=$1&page=$2&t=search_engine [L]

RewriteRule ^/site/support/?$ /site/cgi-bin/support/gforum.cgi?t=search_engine [L]

RewriteRule ^/site/support/.*gforum.cgi /site/cgi-bin/support/gforum.cgi?%{QUERY_STRING} [R,NE,L]


The thing is, I keep getting 500 Internal Server Errors! Does anyone know why this could be happening? I've tried tinkering with the file and the one vaguely interesting thing I've discovered is that If I remove the very last line but keep all the others, I no longer get the 500 errors, but I also don't get any forum pages - just an empty directory listing or 404 errors.

Thanks in advance for any advice.

Best regards,
Adam

Fractured Atlas :: Liberate the Artist
Services: Healthcare, Fiscal Sponsorship, Marketing, Education, The Emerging Artists Fund
Quote Reply
Re: [adamuforestasan] Search Engine Friendly Templates! In reply to
Does anything show up in Apache's error log?

Jason Rhinelander
Gossamer Threads
jason@gossamer-threads.com
Quote Reply
Re: [Jagerman] Search Engine Friendly Templates! In reply to
Thanks so much for the reply. I'm still relatively new at this stuff, so I wouldn't have thought to check the error log on my own.

There is one error which seems to be the real culprit:

[Mon Jun 24 16:52:40 2002] [alert] [client xx.xxx.xxx.xxx] /path/to/.htaccess: RewriteRule: unknown flag 'NE'

Which would seem to gel with the experience that once I got rid of that last line, I started getting 404 errors instead of 500 errors...

Does this give you any ideas? Thanks again.

Adam


Fractured Atlas :: Liberate the Artist
Services: Healthcare, Fiscal Sponsorship, Marketing, Education, The Emerging Artists Fund
Quote Reply
Re: [adamuforestasan] Search Engine Friendly Templates! In reply to
Hi,

Maybe try something similar to this (below): (Note that RewriteEngine will not work with FrontPage extensions.)




RewriteEngine on
Options +FollowSymlinks
RewriteBase /
RewriteRule ^\.htaccess$ - [F]

RewriteRule ^(.*)site/support/(.*)P([0-9]+)/?$ /site/cgi-bin/support/gforum.cgi?post=$3&t=search_engine [L]
RewriteRule ^(.*)site/support/(.*)P([0-9]+)-([0-9]+)/?$ /site/cgi-bin/support/gforum.cgi?post=$3&page=$4&t=search_engine [L]
RewriteRule ^(.*)site/support/(.*)C([0-9]+)/?$ /site/cgi-bin/support/gforum.cgi?category=$3&t=search_engine [L]
RewriteRule ^(.*)site/support/(.*)F([0-9]+)/?$ /site/cgi-bin/support/gforum.cgi?forum=$3&t=search_engine [L]
RewriteRule ^(.*)site/support/(.*)F([0-9]+)-([0-9]+)/?$ /site/cgi-bin/support/gforum.cgi?forum=$3&page=$4&t=search_engine [L]
RewriteRule ^(.*)site/support/?$ /site/cgi-bin/support/gforum.cgi?t=search_engine [L]
RewriteRule ^(.*)site/support/(.*)gforum.cgi /site/cgi-bin/support/gforum.cgi?%{QUERY_STRING} [NS,L]




Good luck! Smile

François
Quote Reply
Re: [adamuforestasan] Search Engine Friendly Templates! In reply to
Hi,

Yes, unfortunately that is a problem with older versions of Apache. I believe the NE tag was added around 1.3.20, but it appears your version is older. Try removing the 'NE' flag and see how things work - it may not be perfect, but it should get the job done. Unfortunately, you may run into problems without it.

I have a possible fix for you, which involves replacing all the occurances of 'gforum.cgi' with '<%cgi_root_url%>/gforum.cgi' in the search engine templates. If you do this, the NE flag is no longer required.

If you have shell access, this command run from the search_engine template set directory should fix it for you:

Code:


perl -p -i.bak -e 's|gforum\.cgi|<%cgi_root_url%>/gforum.cgi|g'

Jason Rhinelander
Gossamer Threads
jason@gossamer-threads.com
Quote Reply
Re: [Jagerman] Search Engine Friendly Templates! In reply to
Okay, I removed the NE tag and made those changes to the templates, but now when I go to /site/support I just get an empty index listing. If I go to /site/support/gforum.cgi I get a 404 error...

Any other thoughts? Should I try Franco's suggestion above?

Thanks again,
Adam

Fractured Atlas :: Liberate the Artist
Services: Healthcare, Fiscal Sponsorship, Marketing, Education, The Emerging Artists Fund
Quote Reply
Re: [Jagerman] Search Engine Friendly Templates! In reply to
Okay, interesting development...

I took Franco's code above and put that in the .htaccess file, which partially worked.

Here's what I now have:

Code:


RewriteEngine on

Options +FollowSymlinks

RewriteBase /

RewriteRule ^\.htaccess$ - [F]

RewriteRule ^(.*)site/support/(.*)P([0-9]+)/?$ /site/cgi-bin/support/gforum.cgi?post=$1&t=search_engine [L]

RewriteRule ^(.*)site/support/(.*)P([0-9]+)-([0-9]+)/?$ /site/cgi-bin/support/gforum.cgi?post=$1&page=$2&t=search_engine [L]

RewriteRule ^(.*)site/support/(.*)C([0-9]+)/?$ /site/cgi-bin/support/gforum.cgi?category=$1&t=search_engine [L]

RewriteRule ^(.*)site/support/(.*)F([0-9]+)/?$ /site/cgi-bin/support/gforum.cgi?forum=$1&t=search_engine [L]

RewriteRule ^(.*)site/support/(.*)F([0-9]+)-([0-9]+)/?$ /site/cgi-bin/support/gforum.cgi?forum=$1&page=$2&t=search_engine [L]

RewriteRule ^(.*)site/support/?$ /site/cgi-bin/support/gforum.cgi?t=search_engine [L]

RewriteRule ^(.*)site/support/(.*)gforum.cgi /site/cgi-bin/support/gforum.cgi?%{QUERY_STRING} [NS,L]


That seems to work as far as bringing up the main category listing page at /site/support. However, at /site/support/, it brings up an empty index page. More significantly, none of the internal links work. When I click on any of the forum or category listings, I get a 404 error. When I click on one of the "jump to post" or other links that go to the "regular" forum, they work fine. But only the main category listing is doing what it's supposed to ala mod_rewrite...

The other little bit of news is that I just found out that my web host uses Apache version 1.3.19, but will be upgrading to 1.3.26 in a few days. Maybe the easiest thing to do is just wait for this upgrade and then use the original version...

Thanks for all the help.

Adam

Fractured Atlas :: Liberate the Artist
Services: Healthcare, Fiscal Sponsorship, Marketing, Education, The Emerging Artists Fund
Quote Reply
Re: [adamuforestasan] Search Engine Friendly Templates! In reply to
Hi Adam,

I think I know where comes from your problem. Change the path '/forum' for '/site/support' in the seach_engine template global vars "cat_full_name_linked" and "cat_path".

Let me know how it goes!

François

Sorry for my poor english...

Last edited by:

Franco: Jun 27, 2002, 3:48 PM
Quote Reply
Re: [Franco] Search Engine Friendly Templates! In reply to
Francois,

Vous parlez (ecrivez?) anglais beaucoup mieux que je parle francais! Pirate

I actually already changed those variables. In fact I'm pretty sure the correct search-engine-friendly urls are being linked to, the rewrite rules just aren't making them display the right content. I checked the error log (thanks to Jagerman I thought to do this this time) and all it says is that:

[Thu Jun 27 15:52:44 2002] [error] [client xxx.xxx.xxx.xx] File does not exist: /path/to/site/support/Fractured_Atlas_Member_Services_C1/Grants_F2/

I'm beginning to get a vague sense for why people say mod_rewrite is like voodoo!

Thanks for your help,
Adam


Fractured Atlas :: Liberate the Artist
Services: Healthcare, Fiscal Sponsorship, Marketing, Education, The Emerging Artists Fund
Quote Reply
Re: [Alex] Search Engine Friendly Templates! In reply to
Hi Alex or Jagerman or anyone.

I notice this thread is quite a few months old so I am wondering if anything might have changed in implementing search engine friendliness with the current version?

Do I need to change the current templates (v1.1.7) at all? And is the .htaccess info still valid?

Thanks


http://www.iuni.com/...tware/web/index.html
Links Plugins
Quote Reply
Re: [Ian] Search Engine Friendly Templates! In reply to
Are other people having trouble with this? I never did get my setup working, even after the version of Apache on my web server was upgraded. The best I could muster was a search engine friendly main index page - none of the category, forum, or post pages would "rewrite" properly.

Just trying to get a sense for whether this is a common problem, or there's some issue with my web server, or if I'm just some kind of moron. Unsure

Fractured Atlas :: Liberate the Artist
Services: Healthcare, Fiscal Sponsorship, Marketing, Education, The Emerging Artists Fund
Quote Reply
Re: [hennagaijin] Search Engine Friendly Templates! In reply to
Yes I have the same problem. Frown
Max
The one with Mac OS X Server 10.4 :)
Quote Reply
Re: [maxpico] Search Engine Friendly Templates! In reply to
hennagaijin try to put this directives in your httpd.conf file and restart Apache:

RewriteLog "/path/to/logs/rewrite.log"
RewriteLogLevel 3

This will allow you to track the actions made by the module and to debug. After debugging you must delete those lines and restart.
Max
The one with Mac OS X Server 10.4 :)
Quote Reply
Re: [maxpico] Search Engine Friendly Templates! In reply to
Thanks, Max. Unfortunately I'm on a shared server, so there are limits to the kinds of things I can change. Did you ever end up getting it to work for you?

Fractured Atlas :: Liberate the Artist
Services: Healthcare, Fiscal Sponsorship, Marketing, Education, The Emerging Artists Fund
Quote Reply
Re: [hennagaijin] Search Engine Friendly Templates! In reply to
No Unsure
I read the Apache.org docs about mod_rewrite but nothing changed...
The strange thing is that the apache error log and the rewrite log doesn't mention anything....
Max
The one with Mac OS X Server 10.4 :)
Quote Reply
Re: [maxpico] Search Engine Friendly Templates! In reply to
I've got something that may help those of you encountering problems getting rewrite going. By default, rewrite translates into a path rewrite instead of a URL rewrite, so on many servers you'll run into this problem:

http://myserver -> /www/htdocs

and so, of course, a path looks like:

http://myserver/foo -> /www/htdocs/foo

which is fine. By default, mod_rewrite changes the requested path and file to the system path. Hence, when you encounter an Alias or ScriptAlias, such as the very common case:

http://myserver/cgi-bin -> /www/cgi-bin

the rewrite breaks. It actually ends up looking for /www/htdocs/cgi-bin/gforum/gforum.cgi instead of /www/cgi-bin/gforum/gforum.cgi, and hence breaks.

Anyway, the long-winded explanation over, the solution (if this is indeed where the problem lies) is to use the "PT" (passthrough) option. Basically, you change your rewrite lines adding the bit in red:

RewriteRule ^/fo......&t=search_engine [L,PT]

Do not, however, add "PT" to the last rule (the gforum.cgi one that ends with: [R, NE, L]).

Jason Rhinelander
Gossamer Threads
jason@gossamer-threads.com
Quote Reply
Re: [Alex] Search Engine Friendly Templates! In reply to
I keep forgetting to post this, but there's now an IIS capable rewrite deal at http://www.qwerksoft.com/products/iisrewrite/ for $100 bucks. We've been using the free trial version and it works fine with the templates.


Realiiity.com Forums
Quote Reply
Re: [Jagerman] Search Engine Friendly Templates! In reply to
Thanks for continuing to plug away at this! Unfortunately, my setup still doesn't work. Adding the PT option didn't appear to have any effect.

So far, the "official version" still gets me a blank directory listing or 404 pages, and Franco's slight edit generates a main category listing but no category, forum, or post pages... Same thing with or without the "PT". Unsure

I'm wondering if there's any correlation between functioning and non-functioning versions of these templates and dedicated vs. shared servers. This is kind of a shot in the dark, since I frankly know so little about this stuff, but your reference to those low level unix directories seems like it must be on the right track and makes me wonder if my problems could have to do with the fact that I'm on a shared host. Just a thought. Thanks again.

Fractured Atlas :: Liberate the Artist
Services: Healthcare, Fiscal Sponsorship, Marketing, Education, The Emerging Artists Fund
Quote Reply
Re: [hennagaijin] Search Engine Friendly Templates! In reply to
Hi,

If you email me shell access, I can take a look for you.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] Search Engine Friendly Templates! In reply to
Thank you so much for offering to help. I just composed a PM to you with all the relevant info, and in the process of explaining my directory structure, I realized a stupid mistake that I made. (Don't ask - it was really stupid...) I just corrected that, and now it works! Happy, happy, day!! Thanks again!

Fractured Atlas :: Liberate the Artist
Services: Healthcare, Fiscal Sponsorship, Marketing, Education, The Emerging Artists Fund
Quote Reply
Re: [hennagaijin] Search Engine Friendly Templates! In reply to
Glad to hear! Did it work without the PT, or did you end up needing that?

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] Search Engine Friendly Templates! In reply to
I did need the PT, yes. The version that works for me is Franco's version with PT tags added to everything but the last line. Granted, I've just started testing, so I may yet encounter difficulties. But so far, so good.

Fractured Atlas :: Liberate the Artist
Services: Healthcare, Fiscal Sponsorship, Marketing, Education, The Emerging Artists Fund
Quote Reply
Re: [hennagaijin] Search Engine Friendly Templates! In reply to
Can someone help me?
I can't get it working.... Crazy
Max
The one with Mac OS X Server 10.4 :)
Post deleted by shiner In reply to
Quote Reply
Re: [Alex] Search Engine Friendly Templates! In reply to
Alex,

thank you for the PM and the link to this thread. I am getting Internal Server Errors when I try to view the /forum/ section.

Here is what I have done:

1) created the /forum/ directory off of my root /web

2) dropped in your .htaccess code with the ,PT just to be safe

3) looked up the installed modules to check for mod_rewrite -- and this is what I think is missing, but I may not know what I am looking for. I see nothing with the word rewrite. would it read "mod_rewrite" or would it say Apache::Rewrite or Cobalt::Rewrite?

If this is my problem, what would I ask my host to install? mod_rewrite? Sorry if that is obvious, but I am just trying to figure this out. I first put the .htaccess in the root and watched as the site subsequently crashed... and then I read on to see that it went in /forum - so I am learning!

Last edited by:

shiner: Jan 28, 2003, 9:41 PM
Quote Reply
Re: [shiner] Search Engine Friendly Templates! In reply to
You'll need to ask your webhost to install the mod_rewrite module. If you have access to your Apache httpd.conf file, you can check it to see if it's installed. It could well be installed but not enabled, and therefore would have a preceding hash (#) on the line where the module is loaded. Mine looks something like:

Code:
memphis% cat /etc/apache/httpd.conf | grep mod_rewrite
LoadModule rewrite_module /usr/lib/apache/1.3/mod_rewrite.so
memphis%

Hope this helps.

- wil
Quote Reply
Re: [Wil] Search Engine Friendly Templates! In reply to
Thank you Will! I thought this post had died. I have contacted the host and have found that the level of service is on par with what I pay for the hosting - next to nothing... So, I am researching new hosts. If my site was revenue making I would probably use Paul or gossamer to host it, simply because of their level of service and intimate product knowledge, but alas - the site is free and so this is a direct expendature for me personally and I have to find cut rate hosting - and with that goes service.



Thanks again and I will look for this with my next host.
Quote Reply
Re: [shiner] Search Engine Friendly Templates! In reply to
Try sending an email to Paul...he has some quite nice plans Wink

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [shiner] Search Engine Friendly Templates! In reply to
If you are not looking for anything super fancy I can provide you with some cheap space on my dedicated server. If you are only looking for the basics I can perhaps offer you something free of charge.

If you are interested, send me a pm outlining what you need and I'll let you know what I can offer.
Quote Reply
Re: [Paul] Search Engine Friendly Templates! In reply to
Thank you! I have contacted Paul with my specifics.
Quote Reply
Re: [Jagerman] Search Engine Friendly Templates! In reply to
Alex,

I have tried both your code and franco's to no avail. When I use your code, with or without the ,PT - nothing happens and I get a blank directory page. When I use franco's code, the page attempts to load, but nothing happens other than a white screen and a partial progress bar at the bottom of my internet explorer. The host has verified that re_write is installed and the server is running Apache 1.3.27

Any suggestions? I have placed the following into a .htaccess file and located that in my www or public_html root directory.






RewriteEngine on
Options +FollowSymlinks
RewriteBase /
RewriteRule ^\.htaccess$ - [F]

RewriteRule ^(.*)forum/(.*)P([0-9]+)/?$ /cgi-bin/forum/gforum.cgi?post=$3&t=search_engine [L,PT]
RewriteRule ^(.*)forum/(.*)P([0-9]+)-([0-9]+)/?$ /cgi-bin/forum/gforum.cgi?post=$3&page=$4&t=search_engine [L,PT]
RewriteRule ^(.*)forum/(.*)C([0-9]+)/?$ /cgi-bin/forum/gforum.cgi?category=$3&t=search_engine [L,PT]
RewriteRule ^(.*)forum/(.*)F([0-9]+)/?$ /cgi-bin/forum/gforum.cgi?forum=$3&t=search_engine [L,PT]
RewriteRule ^(.*)forum/(.*)F([0-9]+)-([0-9]+)/?$ /cgi-bin/forum/gforum.cgi?forum=$3&page=$4&t=search_engine [L,PT]
RewriteRule ^(.*)forum/?$ /cgi-bin/forum/gforum.cgi?t=search_engine [L,PT]
RewriteRule ^(.*)forum/(.*)gforum.cgi /cgi-bin/forum/gforum.cgi?%{QUERY_STRING} [NS,L]
Quote Reply
Re: [shiner] Search Engine Friendly Templates! In reply to
Do you have access to your own server? If so, try turning RewriteLog on and set RewriteLogLevel to 9 to see what's going on.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] Search Engine Friendly Templates! In reply to
Alex,

I am getting space from a friend who is renting a dedicated server from rackspace. After inquiring about whether rewrite was on or not, their techsupport people have informed us that rewrite "is up and running." I use CPanel 6.0 as my interface, and their log function appears to be minimal. I have access to the error log and a raw log file. Do you know how one would go about turning the rewrite log on? Is there something specific that I can upchannel to the rackspace tech guys?

The error log shows nothing but errors where I am trying to call images found in the cgi-bin - their setting do not permit images to be displayed out of cgi-bin.

The raw log just essentially shows image requests, and posts to the forum.

Thanks!
Quote Reply
Re: [shiner] Search Engine Friendly Templates! In reply to
I believe this is just a matter of adding:

RewriteLog /some/system/path/rewrite.log
RewriteLogLevel 9

to your configuration file, or .htaccess file. Be warned - the rewrite log can produce quite a lot of output, and slows down requests by a fair amount. You don't want to forget to turn this back off Wink

Jason Rhinelander
Gossamer Threads
jason@gossamer-threads.com
Quote Reply
Re: [Jagerman] Search Engine Friendly Templates! In reply to
Ok,

so to turn it off, what do I set it to? Or can I just take it out of .htaccess?
Quote Reply
Re: [shiner] Search Engine Friendly Templates! In reply to
Just take it out, or comment it out with #'s.

Jason Rhinelander
Gossamer Threads
jason@gossamer-threads.com
Quote Reply
Re: [Jagerman] Search Engine Friendly Templates! In reply to
I inserted

RewriteLog /home/investin/public_html/rewrite.log
RewriteLogLevel 9


into .htaccess and got an Internal Server Error:

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.



Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.



I checked the error log in CPanel and I do not see anything on this listed.

Additionally, you can see a list of installed mod's from CPanel - and nothing containing the word rewrite is listed. Not mod_rewrite, APACH::REWRITE... nothing, but the host insists that it is there. Here is what I got back from rackspace tech support during a chat session:



The account holder asked:
How do you test mod_rewrite? My client says that it is not available on the server...

(Rackspace)Laurence says:
it's mostly used in .htaccess -- commands to stop hotlinking etc

AuthUserFile /dev/null
AuthGroupFile /dev/null
AuthName DenyUNKNOWCRAWLERS
AuthType Basic

that's mod_rewrite...
Try this:
1) Find out your IP
2) Put it in this file

AuthUserFile /dev/null
AuthGroupFile /dev/null
AuthName DenyUNKNOWCRAWLERS
AuthType Basic

<LIMIT GET POST>
order allow,deny
deny from 193.126.122.158
deny from 193.173.28.106
allow from all
</Limit>

<Files .htaccess>
order allow,deny
deny from all
</Files>


3) Call it htaccess.txt
4) Upload it to the server
5) Rename it to .htaccess

Then see if you can access your site



I think this tech was way off base, but you guys would know better than I.

If I comment out the first line like below, nothing happens and the site runs like normal, but rewrite does not take affect and you see a blank directory listing. However, if I do not comment it out, the site freezes while the page tries to load.





#RewriteEngine on
Options +FollowSymlinks
RewriteBase /
RewriteRule ^\.htaccess$ - [F]

RewriteRule ^(.*)forum/(.*)P([0-9]+)/?$ /cgi-bin/forum/gforum.cgi?post=$3&t=search_engine [L,PT]
RewriteRule ^(.*)forum/(.*)P([0-9]+)-([0-9]+)/?$ /cgi-bin/forum/gforum.cgi?post=$3&page=$4&t=search_engine [L,PT]
RewriteRule ^(.*)forum/(.*)C([0-9]+)/?$ /cgi-bin/forum/gforum.cgi?category=$3&t=search_engine [L,PT]
RewriteRule ^(.*)forum/(.*)F([0-9]+)/?$ /cgi-bin/forum/gforum.cgi?forum=$3&t=search_engine [L,PT]
RewriteRule ^(.*)forum/(.*)F([0-9]+)-([0-9]+)/?$ /cgi-bin/forum/gforum.cgi?forum=$3&page=$4&t=search_engine [L,PT]
RewriteRule ^(.*)forum/?$ /cgi-bin/forum/gforum.cgi?t=search_engine [L,PT]
RewriteRule ^(.*)forum/(.*)gforum.cgi /cgi-bin/forum/gforum.cgi?%{QUERY_STRING} [NS,L]


Everything is pointing IMO to rewrite not being on this box. However, rackspace is positive that it is installed on there.
Quote Reply
Re: [shiner] Search Engine Friendly Templates! In reply to
Im having the same problem. The server has rewrite as im already using it. I have used

Code:
# -- [ Message forum Search Engine Friendly ] --
RewriteEngine on
Options +FollowSymlinks
RewriteBase /
RewriteRule ^\.htaccess$ - [F]
RewriteRule ^(.*)home/domain.com/forum/(.*)P([0-9]+)/?$ /home/domain.com/cgi-bin/gforum.cgi?post=$1&t=search_engine [L,PT]
RewriteRule ^(.*)home/domain.com/forum/(.*)P([0-9]+)-([0-9]+)/?$ /home/domain.com/cgi-bin/gforum.cgi?post=$1&page=$2&t=search_engine [L,PT]
RewriteRule ^(.*)home/domain.com/forum/(.*)C([0-9]+)/?$ /home/domain.com/cgi-bin/gforum.cgi?category=$1&t=search_engine [L,PT]
RewriteRule ^(.*)home/domain.com/forum/(.*)F([0-9]+)/?$ /home/domain.com/cgi-bin/gforum.cgi?forum=$1&t=search_engine [L,PT]
RewriteRule ^(.*)home/domain.com/forum/(.*)F([0-9]+)-([0-9]+)/?$ /home/domain.com/cgi-bin/gforum.cgi?forum=$1&page=$2&t=search_engine [L,PT]
RewriteRule ^(.*)home/domain.com/forum/?$ /home/domain.com/cgi-bin/gforum.cgi?t=search_engine [L,PT]
RewriteRule ^(.*)home/domain.com/forum/(.*)gforum.cgi /home/domain.com/cgi-bin/gforum.cgi?%{QUERY_STRING} [NS,L]
# -- [ End of Message forum Search Engine Friendly ] --


This placed in my .htaccess file within /home/domain.com/forum/

I get 404 accessing all forum links.

If i try

RewriteLog /home/domain.com/rewrite.log
RewriteLogLevel 9

I get a 500 when accessing the links and no log. Any ideas because i have run out of them?

Cat
Quote Reply
Re: [catlovette] Search Engine Friendly Templates! In reply to
Hi:

I have found this to be a really useful addition of Forum- thanks Alex. And, like Paul, I decided to make this the "normal" way I run forum- so thanks Paul for the fix os "*" vs. "+"- I would have never figured this out!

Anyway, after doing the conversion, I had some users complain that now when they click on a thread, they are no longer forwarded to the first NEW post in the thread- they just go to the top of the thread. So I checked the code, and sure enough, that is the case!

So, I figure this would ONLY be a problem if you are a registered user, and logged in... the SE's and such do not log in... so I made the following changes. Thought I would post them- they are pretty obvious if you think about it- but figured if you did not think about it, this easy mod might escape you!

in forum_view.html, beneath:

<%if post_moved%><B>Post Moved:</B>&nbsp;<%endif%>

add this:

<%if current_user_id%>

<a href="gforum.cgi?post=<%if post_moved%><%post_moved_id%><%else%><%post_id%><%endif%>;sb=<%sb%>;so=<%so%>;forum_view=<%this_do%>;<%hidden_query%><%if current_user_default_post_display == 1%><%if post_depth%>#<%post_id%><%elsif current_user_jump_to_unread%>;page=unread#unread<%endif%><%endif%>">

<%else%>

<a href="<%cat_path($cat_id)%><%escape_name($forum_name)%>_F<%forum_id%>/<%escape_name($post_subject)%>_P<%if post_moved%><%post_moved_id%><%else%><%post_id%><%endif%>/">

<%endif%>


<%endif%>

in place of this:

<a href="<%cat_path($cat_id)%><%escape_name($forum_name)%>_F<%forum_id%>/<%escape_name($post_subject)%>_P<%if post_moved%><%post_moved_id%><%else%><%post_id%><%endif%>/">

And just a bit further down, replace:

<a href="<%cat_path($cat_id)%><%escape_name($forum_name)%>_F<%forum_id%>/<%escape_name($post_subject)%>_P<%post_id%>/">

with:

<%if current_user_id%>

<a href="gforum.cgi?post=<%if post_moved%><%post_moved_id%><%else%><%post_id%><%endif%>;sb=<%sb%>;so=<%so%>;forum_view=<%this_do%>;<%hidden_query%><%if current_user_default_post_display == 1%><%if post_depth%>#<%post_id%><%elsif current_user_jump_to_unread%>;page=unread#unread<%endif%><%endif%>">

<%else%>

<a href="<%cat_path($cat_id)%><%escape_name($forum_name)%>_F<%forum_id%>/<%escape_name($post_subject)%>_P<%post_id%>/">

<%endif%>

Now, all un-signed-in users (including SE bots) will get the modified URL's, but your real users will get the old URL which takes them to the first unread post!

Good Luck!

dave

Big Cartoon DataBase
Big Comic Book DataBase

Last edited by:

carfac: May 9, 2003, 12:23 PM
Quote Reply
Re: [carfac] Search Engine Friendly Templates! In reply to
Weird. I had thought that was working this morning, but I just tried it again, and it is not linking to the newest post (even though I- as a logged in user- am getting the "old" URL)

Perhaps GT (Jagerman) could comment- am I missing part of the URL that takes it to the newest post in the thread?
dave

Big Cartoon DataBase
Big Comic Book DataBase
Quote Reply
Re: [carfac] Search Engine Friendly Templates! In reply to
OK, found the problem... the endif at the end of the line to put this code after. I made it RED in the above post. REMOVE THAT ENDIF... and I added the appropriate edif to the code. should be fine now!
dave

Big Cartoon DataBase
Big Comic Book DataBase
Quote Reply
Re: [carfac] Search Engine Friendly Templates! In reply to
Hi,

I can't get this rewrite-stuff to work and have a few questions...

1.My GF is in

http://www.mydomain.de/cgi-bin/myforum/gforum.cgi

and the complete serverpath is

/kunden/path/to/public_html/cgi-bin/forum/gforum.cgi

I've tried it with a rewrite rule like this:

RewriteRule ^/cgi-bin/portugalforum/.*P([0-9]+)/?$ /cgi-bin/portugalforum/gforum.cgi?post=$1&t=search_engine [L]

but I think something is wrong with the paths... anyone there who could help me?

2. In which directory I've to put the .htaccess-file? I think in the directory /public_html/ where the domain points to?

3. What should I do with the file "globals.txt"? Should I put it in the same directory as the new templates?

4. in which directory should I put the templates? Now they are in kunden/path/to/public_html/cgi-bin/forum/admin/templates/search_engine/


Perhaps there is someone: I'm getting crazy...

Kai
___________________________________________
http://www.westalgarve.de
http://www.portugalforum.org
http://www.portugal-links.de

Last edited by:

kailew: May 11, 2003, 3:16 PM
Quote Reply
Re: [kailew] Search Engine Friendly Templates! In reply to
Hi...

no one there who can help me?

please ....

Kai
___________________________________________
http://www.westalgarve.de
http://www.portugalforum.org
http://www.portugal-links.de
Quote Reply
Re: [Alex] Search Engine Friendly Templates! In reply to
Hi

I have some little prob with the search engine templates

Here are the main forders of my site :

http://www.mysite.com/cgi-bin/forum/
http://www.mysite.com/forum/

Here is what I have done :

1) check if mod rewrite was activated >>> YES it is
2) put the search engine template in my template directory
3) copy the file gforum.cgi from http://www.mysite.com/cgi-bin/forum/ to http://www.mysite.com/forum/
4) Created a ..htaccess in http://www.mysite.com/forum/


RewriteRule ^.*P([0-9]+)/?$ gforum.cgi?post=$1&t=search_engine [L]
RewriteRule ^.*P([0-9]+)-([0-9]+)/?$ gforum.cgi?post=$1&page=$2&t=search_engine [L]
RewriteRule ^.*C([0-9]+)/?$ gforum.cgi?category=$1&t=search_engine [L]
RewriteRule ^.*F([0-9]+)/?$ gforum.cgi?forum=$1&t=search_engine [L]
RewriteRule ^.*F([0-9]+)-([0-9]+)/?$ gforum.cgi?forum=$1&page=$2&t=search_engine [L]
RewriteRule ^.?$ gforum.cgi?t=search_engine [L]
RewriteRule ^.*gforum.cgi gforum.cgi?%{QUERY_STRING} [R,NE,L]


I have a prob wit the last lineUnsure, all the other rewrite rules are ok Smile(when I go to the forum homepage, to a category, to forum, to read a thread...)

The problem happens (error 404) when I am not at in the root of http://www.mysite.com/forum/ and when I try to clic on a link with parameters (like the following)
www.mysite.com/forum/category1_C1/forum1_F1/gforum.cgi?do=post_reply_write;parent_post_id=54;guest=4761&t=search_engine

txs for your help

FMP
Quote Reply
Re: [fmp] Search Engine Friendly Templates! In reply to
any idea??

Txs for your help
FMP

Last edited by:

fmp: Sep 5, 2003, 3:03 PM
Quote Reply
Re: [Jagerman] Search Engine Friendly Templates! In reply to
I've tried this, but I'm getting a

;t=search_engine

At the end of the navigation bar (dynamic URLS) which breaks the system.

Everything else seems to work.

I have ^/$ rewritten to my gforum.cgi location, http://beadbanter.com/...in/gforum/gforum.cgi and that works normally. I have to change that, though, when I add in the search engine friendly rewrite rules.

#RewriteRule ^/$ /cgi-bin/gforum/gforum.cgi?t=search_engine [L,PT]

*seems* to work, except that when it comes down to:


#RewriteRule ^/forum/.*gforum.cgi /cgi-bin/gforum/gforum.cgi?%{QUERY_STRING}&t=default [R,L]

even forcing the t=default doesn't seem to work.

I still get ;t=search_engine appended to the cgi links.

I've played with this a bunch, and either end up in a loop, or getting the broken URLs.

Oddling, the rewrites for the "content" work, but if no one can log in, search or post, what good is it ;) <G>

BTW: the #'s are just because I've commented them out, and reverted back to the dynamic site while trying to figure out what may be doing it.


Uggghh.... as I was going to add I applied the cgi_root_url patch, I realized I did that before I tried some of the other tricks. I reverted back to the original templates (as shipped with the current version) and it is working, even with the ;t=search_engine being appended to the cgi strings.

So, while this is a "bug" (or quirk, at least) it "works" or seems to. I just put the forum through a bunch of paces, and can't see anything that isn't working now.

These are the only active rewrite rules I have,

Code:
RewriteRule ^/$ /cgi-bin/gforum/gforum.cgi?t=search_engine [L,PT]
RewriteRule ^/forum/.*P([0-9]+)/?$ /cgi-bin/gforum/gforum.cgi?post=$1&t=search_engine [L,PT]
RewriteRule ^/forum/.*P([0-9]+)-([0-9]+)/?$ /cgi-bin/gforum/gforum.cgi?post=$1&page=$2&t=search_engine [L,PT]
RewriteRule ^/forum/.*C([0-9]+)/?$ /cgi-bin/gforum/gforum.cgi?category=$1&t=search_engine [L,PT]
RewriteRule ^/forum/.*F([0-9]+)/?$ /cgi-bin/gforum/gforum.cgi?forum=$1&t=search_engine [L,PT]
RewriteRule ^/forum/.*F([0-9]+)-([0-9]+)/?$ /cgi-bin/gforum/gforum.cgi?forum=$1&page=$2&t=search_engine [L,PT]
RewriteRule ^/forum/?$ /cgi-bin/gforum/gforum.cgi?t=search_engine [L,PT]
RewriteRule ^/forum/.*gforum.cgi /cgi-bin/gforum/gforum.cgi?%{QUERY_STRING} [R,NE,L]
RewriteRule ^/gforum.cgi /cgi-bin/gforum/gforum.cgi?%{QUERY_STRING} [R,NE,L]


#RewriteRule ^/$ http://beadbanter.com/cgi-bin/gforum/gforum.cgi [R,L,NC]



And they replaced the inactive rewrite rule at the bottom.

One other quirk I found, (and that explains the last active rule) is that on the home page, the dynamic urls in the menu bar were not being rewritten as /forum/etc, but only as /gforum.cgi

Everything *seems* to be working now, but who knows :)

The first rule (for those who may wonder) translates http://beadbanter.com into the main page of the forum script.


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.

Last edited by:

pugdog: Sep 30, 2003, 7:35 AM
Quote Reply
Re: [pugdog] Search Engine Friendly Templates! In reply to
Greetings Everyone!

I just upgraded to the search engine friendly templates. Looks good so far (Thanks Len :) -- however, the "last post/jump to post" icon no longer works. I see it works on the GT forum as well as a couple other GT forums using these templates (that I checked out).

What needs to be done for this to work?

http://www.shwing.com/forum/

Best Regards...
-------------------------------------------
I Am What I AM (Not a Programmer)
Quote Reply
Re: [galfriday] Search Engine Friendly Templates! In reply to
k... I fixed it -- all by my lonesome! that deserves a cherry garcia. yum!
Quote Reply
Re: [brewt] Search Engine Friendly Templates! In reply to
Interesting how the search engine spiders actually see these urls, particularly the last one. As the actual pages end with the slash '/'

.../Forum_Guidelines_P216271/

spiders will see this as another directory so will assume the NEXT part is the readable one - a pseudo index.html file.

Correct thinking on this?

--------------------------------
Privacy Software
Quote Reply
Re: [Alex] Search Engine Friendly Templates! In reply to
Hi;

I've got this working - Thanks!

But I would like GForum to show up under the root directory and be the front page of the site instead of the /forum directory.

Can this be done? I don't know rewrite rules at all, and have tried for a bit to no avail.

So how will the rewrite rules change?

For example, what changes are need in these two:

RewriteRule ^(.*)forum/(.*)gforum.cgi /cgi-bin/forum/gforum.cgi?%{QUERY_STRING} [NS,L]

RewriteRule ^$ /forum [R]

I'm using a virtual include of /cgi-bin/forum/gforum.cgi in the index.html file, by the way.
Quote Reply
Re: [webslicer] Search Engine Friendly Templates! In reply to
In Reply To:
Hi;

....
But I would like GForum to show up under the root directory and be the front page of the site instead of the /forum directory. ...
Greetings Everyone! This is my first post, great support forum.

I also have just upgraded to the search engine friendly templates. They work great. Like webslicer I would appreciate feedback on the best way to have GForum to show up under the root directory and be the front page of the site instead of the /forum directory.

Rod

-----------------------------------------------
Yoga teachers forum / Ringtones for Australia, UK

Last edited by:

rh: Mar 17, 2004, 1:56 PM
Quote Reply
Re: [rh] Search Engine Friendly Templates! In reply to
Thanks, rh;

I think a solidly programmed solution to this is important to Gforum webmasters!

Alex?? Can you help?

By the way, I do like how you have GForum showing up - it is a decent alternative to forum as site front page:

http://forum.yogateaching.com/

How did you do it?
Quote Reply
Re: [webslicer] Search Engine Friendly Templates! In reply to
Can't you just use

RewriteRule ^/$ /cgi-bin/gforum/gforum.cgi [L,PT]

in an .htaccess file in your web directory (or httpd.conf).
Quote Reply
Re: [afinlr] Search Engine Friendly Templates! In reply to
Hmmm...not sure. Just by itself?
Quote Reply
Re: [webslicer] Search Engine Friendly Templates! In reply to
In Reply To:
Thanks, rh;

....

By the way, I do like how you have GForum showing up - it is a decent alternative to forum as site front page:

http://forum.yogateaching.com/

How did you do it?
I assume you are refering the sub domain setup.

If so, I had my hosting company setup a sub-domain, as a separate website than the normal 'www' site (which at this point is not setup). And the forum.yogateaching.com site has a different ip address that the www site.

Rod

-----------------------------------------------
Yoga teachers forum / Ringtones for Australia, UK
Quote Reply
Re: [webslicer] Search Engine Friendly Templates! In reply to
Well no, you need the usual rewrite stuff before it. Something like this I assume:

RewriteEngine on
Options +FollowSymlinks
RewriteBase /
RewriteRule ^\.htaccess$ - [F]
Quote Reply
Re: [rh] Search Engine Friendly Templates! In reply to
Ok.
And then what are your rewrite rules?
Quote Reply
Re: [webslicer] Search Engine Friendly Templates! In reply to
Here are my rewrite rules at forum.yogateaching.com

RewriteEngine on

Options +FollowSymlinks

RewriteBase /


RewriteRule ^\.htaccess$ - [F]


RewriteRule ^(.*)forum/(.*)_P([0-9]+)/?$ /gforum.cgi?post=$3&t=search_engine [L]

RewriteRule ^(.*)forum/(.*)_P([0-9]+)-([0-9]+)/?$ /gforum.cgi?post=$3&page=$4&t=search_engine [L]

RewriteRule ^(.*)forum/(.*)_F([0-9]+)/?$ /gforum.cgi?forum=$3&t=search_engine [L]

RewriteRule ^(.*)forum/(.*)_F([0-9]+)-([0-9]+)/?$ /gforum.cgi?forum=$3&page=$4&t=search_engine [L]

RewriteRule ^(.*)forum/(.*)_C([0-9]+)/?$ /gforum.cgi?category=$3&t=search_engine [L]

RewriteRule ^(.*)forum/?$ /gforum.cgi?t=search_engine [L]

RewriteRule ^(.*)forum/(.*)gforum.cgi /gforum.cgi?%{QUERY_STRING} [NS,L]

RewriteRule ^/?$ /gforum.cgi?t=search_engine [L]


Rod

-----------------------------------------------
Yoga teachers forum / Ringtones for Australia, UK

Last edited by:

rh: Mar 21, 2004, 3:26 PM
Quote Reply
Re: [rh] Search Engine Friendly Templates! In reply to
These rules have been working on http://beadbanter.com for awhile now:

Code:

RewriteRule ^/$ /cgi-bin/gforum/gforum.cgi?t=search_engine [L,PT]
RewriteRule ^/forum/.*P([0-9]+)/?$ /cgi-bin/gforum/gforum.cgi?post=$1&t=search_engine [L,PT]
RewriteRule ^/forum/.*P([0-9]+)-([0-9]+)/?$ /cgi-bin/gforum/gforum.cgi?post=$1&page=$2&t=search_engine [L,PT]
RewriteRule ^/forum/.*C([0-9]+)/?$ /cgi-bin/gforum/gforum.cgi?category=$1&t=search_engine [L,PT]
RewriteRule ^/forum/.*F([0-9]+)/?$ /cgi-bin/gforum/gforum.cgi?forum=$1&t=search_engine [L,PT]
RewriteRule ^/forum/.*F([0-9]+)-([0-9]+)/?$ /cgi-bin/gforum/gforum.cgi?forum=$1&page=$2&t=search_engine [L,PT]
RewriteRule ^/forum/?$ /cgi-bin/gforum/gforum.cgi?t=search_engine [L,PT]
RewriteRule ^/forum/.*gforum.cgi /cgi-bin/gforum/gforum.cgi?%{QUERY_STRING} [R,NE,L]
RewriteRule ^/gforum.cgi /cgi-bin/gforum/gforum.cgi?%{QUERY_STRING} [R,NE,L]


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [pugdog] Search Engine Friendly Templates! In reply to
Do I need to change the default_template_set to the search engine set in setup in order for the rewrite to work?

CCUnet
my Christian web
Quote Reply
Re: [ccunet] Search Engine Friendly Templates! In reply to
You need to set the default set to be search_engine, *BUT* and this drove me crazy for a long time, you also need to edit the search_engine templates globlas, the cat_path global.
The last line:

return \"/gforum/$cat_name";

has to be changed to whatever your directory is, eg:

return \"/support/$cat_name";


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [pugdog] Search Engine Friendly Templates! In reply to
Thanks Pugdog that really helped.
I think I finally got everything working execpt my home link is missing a subdirectory.
So instead of having mywebsite.com/connections/forum it is mywebsite.com/forum

My rewrite is below.

Code:

RewriteRule ^connections/forum/.*P([0-9]+)/?$ /cgi-bin/forum/gforum.cgi?post=$1&t=search_engine [L]
RewriteRule ^connections/forum/.*P([0-9]+)-([0-9]+)/?$ /cgi-bin/forum/gforum.cgi?post=$1&page=$2&t=search_engine [L]
RewriteRule ^connections/forum/.*C([0-9]+)/?$ /cgi-bin/forum/gforum.cgi?category=$1&t=search_engine [L]
RewriteRule ^connections/forum/.*F([0-9]+)/?$ /cgi-bin/forum/gforum.cgi?forum=$1&t=search_engine [L]
RewriteRule ^connections/forum/.*F([0-9]+)-([0-9]+)/?$ /cgi-bin/forum/gforum.cgi?forum=$1&page=$2&t=search_engine [L]
RewriteRule ^connections/forum/?$ /cgi-bin/forum/gforum.cgi?t=search_engine [L]
RewriteRule ^connections/forum/.*gforum.cgi /cgi-bin/forum/gforum.cgi?%{QUERY_STRING} [R,NE,L]
RewriteRule ^connections/forum/(.*)gforum.cgi /cgi-bin/forum/gforum.cgi?%{QUERY_STRING} [NS,L]


CCUnet
my Christian web

Last edited by:

ccunet: May 10, 2004, 6:16 PM
Quote Reply
Re: [Alex] Search Engine Friendly Templates! In reply to
Hi.

Tried the original rules and got 404 error all throughout on all links of Forum Home Page. Then tried the modified ones on forum and the content of .htaccess is

RewriteEngine On
Options +FollowSymlinks
RewriteBase /forum
#RewriteRule ^\.htaccess$ - [F]
RewriteOptions inherit
RewriteRule ^(.*)forum/.*P([0-9]+)/?$ /cgi-bin/webmailforum/gforum.cgi?post=$1&t=search_engine [L]
RewriteRule ^(.*)forum/.*P([0-9]+)-([0-9]+)/?$ /cgi-bin/webmailforum/gforum.cgi?post=$1&page=$2&t=search_engine [L]
RewriteRule ^(.*)forum/.*C([0-9]+)/?$ /cgi-bin/webmailforum/gforum.cgi?category=$1&t=search_engine [L]
RewriteRule ^(.*)forum/.*F([0-9]+)/?$ /cgi-bin/webmailforum/gforum.cgi?forum=$1&t=search_engine [L]
RewriteRule ^(.*)forum/.*F([0-9]+)-([0-9]+)/?$ /cgi-bin/webmailforum/gforum.cgi?forum=$1&page=$2&t=search_engine [L]
RewriteRule ^(.*)forum/?$ /cgi-bin/webmailforum/gforum.cgi?t=search_engine [L]
RewriteRule ^(.*)forum/.+gforum.cgi /cgi-bin/webmailforum/gforum.cgi?%{QUERY_STRING} [R,NE,L]

The home page displays fine.
On Clicking the Category (with forums there) links, following is displayed:

Sorry, there are no forums available.

On Clicking The Forum Links, it gets back to the GF Home Page no matter which forum is clicked. So it's always the forum home page which is displayed.


Also when the dynamic links on home page are accessed when accessing from http://mysite/forum

the urls are:
http://mysite/forum/gforum.cgi etc etc

How to get over these?


TIA
Anup
Quote Reply
Re: [anup123] Search Engine Friendly Templates! In reply to
Does anyone have any thoughts regarding Google's PageRank and the search engine friendly templates?

My client has an existing forum that currently has an excellent ranking in Google, and he's concerned about losing it when he moves to Gossamer.

The search engine friendly templates allow Google to index the forum via http://example.com/forum/, but human users and their sites will be linking to http://example.com/gforum/. It seems to me that this can't help but hurt the forums PageRank, although in all honesty I might simply be misunderstanding things.

Thoughts?

thanks!
Quote Reply
Re: [abacab] Search Engine Friendly Templates! In reply to
Could anyone throw me a bone here. This is as frustrating as all get out. My forum categories are linking fine using serach engine friendly links. But none of the navigational links home/mainindex/login/search posts/who's online/last post work.

The are all one directory short of the gforum.cgi location. I get mysite.com connections/gforum.cgi instead of mysite.com/connections/forum/gforum.cgi.

I'm using the rewrite above with Pugdog's mod to the gobal.txt local in my root .htaccess since putting in a subdirectory doesn't seem to work for me.

I'm turning gray on this one and start to pull the gray hairs out. Shocked

anyhelp would be greatly appreciated.
CCUnet
my Christian web
Quote Reply
Re: [ccunet] Search Engine Friendly Templates! In reply to
I think the easiest way to fix this is to add a rewrite rule

RewriteRule /gforum.cgi(.*)$ /connections/forum/gforum.cgi$1 [L]

This should rewrite any calls to gforum.cgi to the correct directory.
Quote Reply
Re: [afinlr] Search Engine Friendly Templates! In reply to
Thanks for the help Laura,
Didn't work though. Should it be in a particular location?

CCUnet
my Christian web
Quote Reply
Re: [ccunet] Search Engine Friendly Templates! In reply to
My guess is that it should be in the root directory. I use it in my httpd.conf file where it works fine - I'm not as familiar with using .htaccess files but I assume that they must hold for that directory and all its subdirectories so as long as its in the root directory I would have though that it should work.
Quote Reply
Re: [afinlr] Search Engine Friendly Templates! In reply to
Laura,
It is in my root directory. I am actually trying to get it to point to my forum cgi directory. But all I get with those navlinks are 404 errors

This on really has me stumped. I"m hoping Alex or someone from GT will help.

CCUnet
my Christian web

Last edited by:

ccunet: May 16, 2004, 10:49 AM
Quote Reply
Re: [afinlr] Search Engine Friendly Templates! In reply to
Hi.

True. Alex's rules work fine in httpd.conf but gives all those 404 errors when used in .htaccess.

But i am totally stumped on my trials with 1.2.2 ....

http://www.gossamer-threads.com/...orum.cgi?post=266852

Looks like just one instance of invoking Advanced Editor would freeze/bring down the server.....

Anup
Quote Reply
Re: [Alex] Search Engine Friendly Templates! In reply to
hello

if i use the Search Engine Friendly Templates i cant jumt to the firts unread post
Code:
<a href="<%cat_path($cat_id)%><%escape_name($forum_name)%>-f<%forum_id%>/<%escape_name($post_subject)%>-p<%post_id%>/"><b><%post_subject%></b></a>
This is the code for the Subject
i Add the code to jump to the first unread Post

Code:
<a href="<%cat_path($cat_id)%><%escape_name($forum_name)%>-f<%forum_id%>/<%escape_name($post_subject)%>-p<%post_id%>/gforum.cgi?post=<%if post_moved%><%post_moved_id%><%else%><%post_id%><%endif%>;sb=<%sb%>;so=<%so%>;forum_view=<%this_do%>;<%hidden_query%>;page=unread#unread"><b><%post_subject%></b></a>
an it takes me to the first unread post but the forums dosent count up the "views" for the Post

Any Idea for this problem

hoefti
linktobuy Web Directory
Ratgeber Recht
Quote Reply
Re: [hoefti] Search Engine Friendly Templates! In reply to
I finally got all but one link the HOMe link to work by putting the following htaccess in a blank folder on the non cgi side of my site

Code:

RewriteEngine On
RewriteRule ^.*P([0-9]+)/?$ /cgi-bin/myforum/gforum.cgi?post=$1&t=search_engine [L,PT]
RewriteRule ^.*P([0-9]+)-([0-9]+)/?$ /cgi-bin/myforum/gforum.cgi?post=$1&page=$2&t=search_engine [L,PT]
RewriteRule ^.*C([0-9]+)/?$ /cgi-bin/myforum/gforum.cgi?category=$1&t=search_engine [L,PT]
RewriteRule ^.*F([0-9]+)/?$ /cgi-bin/myforum/gforum.cgi?forum=$1&t=search_engine [L,PT]
RewriteRule ^.*F([0-9]+)-([0-9]+)/?$ /cgi-bin/myforum/gforum.cgi?forum=$1&page=$2&t=search_engine [L,PT]
RewriteRule ^/?$ /cgi-bin/myforum/gforum.cgi?t=search_engine [L]
RewriteRule ^gforum.cgi(.*)$ /cgi-bin/myforum/gforum.cgi?%{QUERY_STRING} [R,NE,L]
RewriteRule ^gforum.cgi /cgi-bin/myforum/gforum.cgi?%{QUERY_STRING} [R,NE,L]
RewriteRule ^.*gforum.cgi /cgi-bin/myforum/gforum.cgi?%{QUERY_STRING} [R,NE,L]
RewriteRule ^.*gforum.cgi /cgi-bin/myforum/gforum.cgi

Don't know if this helps
CCUnet
my Christian web
Quote Reply
Re: [Alex] Search Engine Friendly Templates! In reply to
Hi

In the rewrited URLs, I would like to have hyphens instead of underscores

I think I have to changes some globals in the general vars... but where exactly...

Txs

FMP
Quote Reply
Re: [fmp] Search Engine Friendly Templates! In reply to
You'll need to change 2 globals on the 'search_engine' template set - 'escape_name' and 'cat_path'. 'escape_name' needs the line '$name =~ y/ \t\r\n?"'#/__/d;' changed so that those two _'s are -'s. 'cat_path' needs the same change, in two places (just search for '__').

Jason Rhinelander
Gossamer Threads
jason@gossamer-threads.com
Quote Reply
Re: [Jagerman] Search Engine Friendly Templates! In reply to
Txs Jason

It works fine ; 2 more points

1) And if I want to replace all the hyphens (I mean instead of having
my-first-category_C1/my-first-forum_F1/my-first-discussion_F1/
having
my-first-category-C1/my-first-forum-F1/my-first-discussion-F1/

2) second problem, as I am french I have some accents in my category names, my forum names and the discussions titles : is it possible to replace (in the urls) the ad where to do it
é by e
è by e
ê by e
à by a
ç by c
â by a
î by i
ù by u
ô by o
Is there a regex to do it easily


Txs
FMP
Quote Reply
Re: [fmp] Search Engine Friendly Templates! In reply to
Hi everybody

no ideas?

txs
FMP
Quote Reply
Re: [Jagerman] Search Engine Friendly Templates! In reply to
Hi

I have resolved my accent problem. So my last problem is :

And if I want to replace all the hyphens (I mean instead of having
my-first-category_C1/my-first-forum_F1/my-first-discussion_P1/
having
my-first-category-C1/my-first-forum-F1/my-first-discussion-P1/


in cat_path I have replaced
my $category = q|%s_C%d/|;
by
my $category = q|%s-C%d/|;

So I have now what I wand in the first part of the URL
my-first-category-C1/my-first-forum_F1/my-first-discussion_P1/

How to modify the last part to get
my-first-category-C1/my-first-forum-F1/my-first-discussion-P1/


Txs
FMP
Quote Reply
Re: [fmp] Search Engine Friendly Templates! In reply to
so

I solved my problem

to get
my-first-category-C1/my-first-forum-F1/my-first-discussion-P1/

In the template/search_engine/compiled I have replaced

$return .= q{_F};
and
$return .= q{_P};

by

$return .= q{-F};
and
$return .= q{-P};


regards
FMP
Quote Reply
Re: [fmp] Search Engine Friendly Templates! In reply to
In Reply To:
to get
my-first-category-C1/my-first-forum-F1/my-first-discussion-P1/
In the template/search_engine/compiled I have replaced
$return .= q{_F}; and $return .= q{_P};
by
$return .= q{-F}; and $return .= q{-P};


The problem is that when I make some changes in my templates files, the compiled template files are generated and all the changes I have done have disappeared.

Where do I have to make the changes to get $return .= q{-F}; and $return .= q{-P}; instead of $return .= q{_F}; and $return .= q{_P}; in the compiled template files...


regards
FMP
Quote Reply
Re: [fmp] Search Engine Friendly Templates! In reply to
Hi

It was simply in the static template files...Blush

FMP
Post deleted by carminejg3 In reply to
Quote Reply
Re: [fmp] Search Engine Friendly Templates! In reply to
Hopefully GForum 2 will have SEO without all the mod_rewrite hassle
Max
The one with Mac OS X Server 10.4 :)
Quote Reply
Re: [maxpico] Search Engine Friendly Templates! In reply to
In Reply To:
Hopefully GForum 2 will have SEO without all the mod_rewrite hassle

Would be nice to get a comment from GT about this.

I can't get these to work at all. I've tried almost every combination posted throughout this thread and the links just display 404.

It would be useful to get a "Dummies Guide" to installing this feature. Some posts mention crating a /forum/ directory and putting .htaccess in that, others point to adding the info to the .htaccess in the root.

I have the templates, I have the globals, I have 404 Page Not Found, I have a sore head!
Quote Reply
Re: [fmp] Search Engine Friendly Templates! In reply to
In Reply To:
so

I solved my problem

to get
my-first-category-C1/my-first-forum-F1/my-first-discussion-P1/

In the template/search_engine/compiled I have replaced

$return .= q{_F};
and
$return .= q{_P};

by

$return .= q{-F};
and
$return .= q{-P};


regards
FMP


Which template/search_engine/compiled exactly??? any help please! or perhaps which static template exactly? Thanks


SEO Consultation
Economics & Personal Finances

Last edited by:

discusswireless: Apr 29, 2006, 11:01 PM
Quote Reply
Re: [discusswireless] Search Engine Friendly Templates! In reply to
Has anyone seen their individual posts lose Page Rank and dropping off search engine results?