View Single Post
  #225  
Old 04-24-2003, 03:06 AM
The Piper's Avatar
The Piper The Piper is offline
 
Join Date: Apr 2002
Location: Brazil
Posts: 63
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I've been using Logician's WEBTEMPLATES hack for the longest time for several pages on my website, it's one of the greatest hacks ever developed (along with vbHome (lite) and vbMicroStats, IMHO). However, I've never really liked the format of the URLs with the WEBTEMPLATES hack.

URLs right now look like this: http://www.pinkfloydfan.net/show.php?pg=books

The problem is, search engines, specially Google, don't seem to like URLs with parameters passed through them, such as the "?pg=books" part.

So, after some research, I found out how to use Apache's .htaccess to have search-engine friendly links.

First, make sure your server has the Apache module mod_rewrite installed..

Open .htaccess, and add:
Code:
RewriteEngine on 
RewriteRule ^books\.php$ show.php?pg=books [NC]
RewriteRule ^posters\.php$ show.php?pg=posters [NC]
You can change the first part (^books\.php$) to whatever file name you would like your webtemplate to have, including a .html extension, such as ^this_is_my_books_page\.html$. Add as many lines as you wish/need. I have as many lines as webtemplates, so now all of them are search-engine friendly.

Also, make sure that if you already have a "RewriteEngine on" line on your .htaccess, that you don't add a second one.

Check it out for yourself: http://www.pinkfloydfan.net/books.php. It takes you to the same WEBTEMPLATE as the previous URL.

Just thought I'd share this with you. Logician, again, congrats on this great hack. I hope you keep on developing it. One thing I'd like to see that shouldn't be too hard to implement is a "Search" function for WEBTEMPLATES, much like we have for the Templates on VB's Admin CP.

I'm also having problems with the Who's Online hack you just posted a few posts back, much like other users. Would you please be so kind as to double check to see if your instructions are precise? Thanks a lot!
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01130 seconds
  • Memory Usage 1,766KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete