M
M
morgana_lf2015-10-28 00:46:31
Wix
morgana_lf, 2015-10-28 00:46:31

Is it possible to set up a redirect from a page with the "#!" symbol?

Good afternoon. We are moving from wix and have this problem. It is necessary to redirect visitors from links like "www.mysite.ru/#!bog-morok-seven/etc27" to links like "mysite.ru/bog-morok-seven‎". Is it possible to implement this somehow, what methods are worth reading about?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
morgana_lf, 2015-11-06
@morgana_lf

The issue is resolved as follows:

function themee_hash_redirects() {
    ?>
    <script type="text/javascript">
        function themee_hashtag_redirect( hashtag, url) {
            var locationHash = document.location.hash;
            if ( locationHash.match(/#!/img) ) {
                if ( hashtag == locationHash ) {
                    document.location.href = url;
                }
            }
        }
        // Examples how to use themee_hashtag_redirect
        themee_hashtag_redirect('#!interview-bright-tone/o23zv', '/interview-bright-tone/');

Plus a 301 redirect from www to non-www.
I hope it will be useful to someone.

V
Viktor Taran, 2015-11-06
@shambler81

Yes, this is a redirect with a get parameter

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question