vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Community Lounge (https://vborg.vbsupport.ru/forumdisplay.php?f=13)
-   -   any rewrite pros? (https://vborg.vbsupport.ru/showthread.php?t=51232)

Sebastian 04-05-2003 06:43 PM

any rewrite pros?
 
I asked this question about 10 different times at various sites, no one knows how, or haven't offered any help :(


anyhow:

I'd like to make my URL's seach engine friendly.

I would like to make /articles/comments.php?id=120

act as /articles/120


and then say i have: /articles/comments.php?id=120&page=3

act as /articles/120/3

I know some of you people have done this, any help for me?


I posted this here because we have no apache forum, and well, i thought i'd get better help here, just becasue i know some of you ppl are smart ;)

filburt1 04-05-2003 06:45 PM

I have viewed myself as a regexp god recently so try this:
Code:

/\/articles\/comments.php\?id=[0-9]*/ /articles/$1

Sebastian 04-05-2003 06:46 PM

sorry fil i have no experience with regexp / rewrite, what do i do with that code? :p

can it be done via .htaccess instead?

thanks.

filburt1 04-05-2003 06:52 PM

Code:

RewriteEngine on
RewriteRule /\/articles\/comments.php\?id=[0-9]*/ /articles/$1

...in a .htaccess.

Sebastian 04-05-2003 06:55 PM

Thanks, It doesn't work though. I get 404 not found.

i tested mod_rewrite so i know its working.. hmm.


All times are GMT. The time now is 02:58 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.00968 seconds
  • Memory Usage 1,710KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete