A
A
Alexander2016-11-23 19:07:02
Apache HTTP Server
Alexander, 2016-11-23 19:07:02

How to correctly write a redirect in .htaccess?

There is the following task:
you need to make a redirect from the link
domain.ru/ishop/3_1
to the link
domain.ru/katalog/razdel
Those methods that I found either do not work or give out something like domain.ru/katalog/razdel?q=ishop/ 3_1
How do I understand underlining is something like a parameter? Because after it you can pass any set of characters and the 404 error will not return.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Golyagin, 2016-12-01
@aleksand44

RewriteRule ^old-page.html$ new-page.html [R=301,NC,L]

the mod_rewrite module must be enabled in php
. And in general, you gave little information to get an answer. If not working. then write the site engine if it is, who is hosting: for example
OS: Ubuntu Server Edition
Apache:2.4.10
MySQL:percona 5.7.14-8
Nginx:1.11.6
Perl:5.14.2
PHP:5.2 5.3 5.4 5.5 5.6 7.0
Python:2.7.3
etc. then get the answer)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question