A
A
Alexey Kurilkin2019-01-31 16:06:40
1C-Bitrix
Alexey Kurilkin, 2019-01-31 16:06:40

How to add an alias to a WordPress post without a 301 redirect?

Colleagues, the question arose of how to implement an alias for a post in the WordPress CMS.
The situation is as follows - at the root is 1C Bitrix, in a separate folder /blog/ on WP.
Not working .htaccess options:
RewriteRule ^/test/?$ /blog/prodvizhenie-sajtov-v-google/ [E=REQUEST_URI:/blog/prodvizhenie-sajtov-v-google/,N]
RewriteRule ^/test/?$ /blog/?p=330693 [E=REQUEST_URI:/blog/?p=330693,N]
RewriteRule ^test/$ blog/prodvizhenie-sajtov-v-google/ [L,NC]
RewriteRule ^test/$ blog/? p=330693 [L,NC]
If we remove NC shaping in WP (which is not suitable for us), then the last option works. We don't need a 301 redirect, it's important to save the URL /test/. Any alternative suggestions?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question