Forum Moderators: phranque
It seems a neat way of getting Search Engines to index these long query string URLs it to write something along the lines of:
RewriteEngine on
RewriteBase /
RewriteRule ^forum/01/(.*)$[site-of-forum.co.uk...]
Unfortunatly, when I upload the .htaccess file to my servers, I get a nasty "Internal Server Error". So I figued that the mod_rewrite module isn't loaded - but unfortunately techinical support have come reminded me to read the small print (they don't provide support for their CGI servers).
Ok, not a problem, I'll try this on the main servers on my main site. So I loaded up the same .htaccess file.
So now when I type www.main-site.co.uk/forum/01 I get [site-of-forum.co.uk...] Excellent. Thing is, this means I'd have to write a line in the .htaccess file for every single forum thread.
Or do I? A typcial URL on the forum is: [site-of-forum.co.uk...]
I'm happy to try and alter some PHP if the answer lay there. (Just that I'll actually have to go off and learn PHP first!) All I really want to know is if its possible to het the above URL to be a bit more pretty.
Or shall I just give up and wait for google to crawl my site?
Welcome to WebmasterWorld [webmasterworld.com]!
Take a look at this thread [webmasterworld.com], where Anguz appears to be working on a very similar problem.
The trick is to put shortened versions of your script variables into the "visible" URI using slashes instead of "?", "&", etc.
So, you could use something like "http://www.site-of-forum.co.uk/display/comments" for the search-engine- and user-visible URI, and rewrite that back to the form that script requires.
Plan a flexible solution first, and then get into the implementation details.
Jim