F
F
fantazerno2014-06-25 10:56:53
PHP
fantazerno, 2014-06-25 10:56:53

How to redirect from to a page without index.php?

Hello
, there are two links
rus/blog/?page=post
and
rus/blog/index.php?page=post
As when entering the first one, there was a 301 redirect to the second one
Thank you in advance!

Answer the question

In order to leave comments, you need to log in

4 answer(s)
K
kompi, 2014-06-25
@fantazerno

It can be done in two ways:
- either by a rule in the nginx config
- or by a rule in the Bitrix urlrewrite.php.
Naturally, the 1st method is faster and less resource-intensive. Plus 2nd - does not depend on the type of server.

A
andymitrich, 2014-06-25
@andymitrich

Read what .htaccess is and study the rules of its work - you will be happy.

A
Antony Ryabov, 2014-06-25
@tonymadbrain

What is the web server?

O
Oleg Krasnov, 2014-06-25
@OKrasnov

Something like this:
RewriteCond %{QUERY_STRING} ^page=post$
RewriteRule ^rus/blog/(.*)$ /rus/blog/index.php?page=post [L,R=301]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question