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

Search Engine Friendly Templates!

(Page 4 of 5)
> > > >
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
> > > >