vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB5 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=262)
-   -   How to set 301 redirect? (https://vborg.vbsupport.ru/showthread.php?t=327158)

issirius 03-19-2019 01:56 PM

How to set 301 redirect?
 
Hello, I want to set 301 redirect.

I opened .htacces, that I've renamed after install process from htaccess.txt

I add the following condition to the end of file:

<IfModule mod_rewrite.c>
RewriteEngine On
RedirectMatch 301 /forum/forum6/thread94188.html#post575816 /forum/subforlder-1/subfolder-2/96098-yoni-the-bassist-the-flow-of-emotions-2018-video
</IfModule>

delicjous 03-19-2019 07:33 PM

As I remember you have to put it into the beginning of the file... I could not look into that right now, but I think there are other redirects in the middle of the file and your will not work at the end.

issirius 03-20-2019 08:52 AM

Quote:

Originally Posted by delicjous (Post 2598833)
As I remember you have to put it into the beginning of the file... I could not look into that right now, but I think there are other redirects in the middle of the file and your will not work at the end.

I add to the begin of the file. But it doesn't work. The url doesn't change. No redirect and I see typical page for post not found.

delicjous 03-20-2019 09:06 AM

Should look like this:


Code:

<IfModule mod_rewrite.c>
        RewriteEngine On
       
#Start Redirects

RewriteRule ^(.+)/forum(.*)$ https://forum.test.de/forum/$2 [R=301,L]
......

Redirect is only an example!


All times are GMT. The time now is 05:54 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.00962 seconds
  • Memory Usage 1,714KB
  • 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
  • (1)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)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