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

Search Engine Friendly Templates!

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