I
I
Ivan2020-01-16 18:08:36
JavaScript
Ivan, 2020-01-16 18:08:36

How to glue these pages through htaccess?

How to glue these pages with a 301 redirect?
There are pages like this
mysite.ru/videos/category/1
mysite.ru/videos/category/2 and so
on, you need to make a 301 redirect from them to
mysite.ru/videos/category/1?page_id=1
mysite.ru/videos/ category/2?page_id=1
It should be taken into account that the page id may be different so that this does not suffer.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander, 2019-04-04
@Krauzer

Use the window.pageYOffset variable.
More details here - https://www.w3schools.com/jsref/prop_win_pagexoffs...

V
Viktor Taran, 2020-01-23
@shambler81

RewriteRule ^videos/category/([0-9]{1,})$ /videos/category/1\?page_id=$1 [L,R=301]

Actually, if the ID is equal to the category number.
but you are doing some kind of baboon, on the contrary, they get rid of the get parameters in the urls.
If GET is just a static number then
RewriteRule ^videos/category/[0-9]{1,}$ /videos/category/1\?page_id=1 [L,R=301]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question