A while ago we had a conversation here about making the URL's on the forums search engine friendly. If anyone's interested I've set up http://dbforums.com like this very easily using mod_rewrite and editing a few templates. There's no need to change all the links, in fact it's a bad idea to do that or you'll get the spiders crawling your site all day and killing your server .
All you have to us edit the forumhome and forumdisplay templates (which ones exactly depends on how many levels you have your forums) and change the links to something like this:
for forums, and
for threads, (without the spaces)
Then add these entries in your httpd.conf:
and finally add the following line in your header template:
Just changing those templates is enough for a search engine to spider all your threads.
Now your links on the front page should like this:
/f5/s817784f8f65038e37835caa4d05a8a10
This is all assuming you have mod_rewrite installed and enabled obviously.
All you have to us edit the forumhome and forumdisplay templates (which ones exactly depends on how many levels you have your forums) and change the links to something like this:
Code:
$ bburl/f$ forum[forumid]/s$ session[sessionhash]
Code:
$ bburl/t$ thread[threadid]/s$ session[sessionhash].html
Then add these entries in your httpd.conf:
Code:
RewriteEngine on RewriteRule ^/f([0-9]+)/s([^/]+?)$ /forumdisplay.php?forumid=$1&s=$2 [L] RewriteRule ^/t([0-9]+)/s([^/]+?)\.html$ /showthread.php?threadid=$1&s=$2 [L] RewriteRule ^/s([^/])+?/$ /index.php?s=$1 [L]
Code:
<base href="$bburl">
Now your links on the front page should like this:
/f5/s817784f8f65038e37835caa4d05a8a10
This is all assuming you have mod_rewrite installed and enabled obviously.
Comment