vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB5 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=263)
-   -   How can I redirect this link using htaccess ? (https://vborg.vbsupport.ru/showthread.php?t=298030)

sadiq6210 05-10-2013 09:03 PM

How can I redirect this link using htaccess ?
 
The link was like this:
Code:

http://www.donaim.com/forum/t1000-5/
where 1000 is the thread id and 5 is the page#

I want to redirect it to
Code:

http://www.domain.com/forum/showthread.php?t=1000&page=5

I tried this:
Code:

RewriteRule ^t([0-9]+-[0-9]+)/$ http://www.domain.com/forum/showthread.php?t=$1 [L,R=301]

But it is redirected to:
http://www.domain.com/forum/showthread.php?t=1000-5

I want it like (showthread.php?t=1000&page=5)

Any idea?

sadiq6210 05-11-2013 07:15 AM

I solved it

If anybody need this in future, this is the code

Code:

RewriteRule ^t([0-9]+)-([0-9]+)/$ http://www.domain.com/forum/showthread.php?t=$1&page=$2 [L,R=301]
RewriteRule ^t([0-9]+)/$ http://www.domain.com/forum/showthread.php?t=$1 [L,R=301]


ForceHSS 05-11-2013 08:23 AM

Why you want it to go to a thread never seen anyone make there htaccess file this way

sadiq6210 05-11-2013 07:56 PM

Quote:

Originally Posted by ForceHSS (Post 2421256)
Why you want it to go to a thread never seen anyone make there htaccess file this way

I am not sure what do you mean but if you ask why I need to do this?

I uninstalled VBSEO so I need to redirect the links to the original

JamalFree 05-19-2013 09:59 PM

thank you for sharing solution sadiq..........


All times are GMT. The time now is 04:02 PM.

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.01088 seconds
  • Memory Usage 1,719KB
  • 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
  • (4)bbcode_code_printable
  • (1)bbcode_quote_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