Anchor in URL redirection issue.

Hello, so I have a problem, currently my site has direct URL with anchors for the HTML:!/franks/34232157/1

But when I go there in the browser it changes the URL to

I need it to stop this behavior, I am using nginx as web server and as redirection, there several rules for redirecting, the site is not mine, I am just doing some fixing, so I don't have much information, the redirections I think can be doing this are:

                rewrite ^/(\w+)/embed/&(.*)$ /newestentry/request.php?taglist=user/$1&$2;
                rewrite ^/(\w+)/$ /;
                rewrite ^/(\w+)$ /newestentry/request.php?taglist=user/$1;
                rewrite ^/(\w+)/(\w+)/$ /;
                rewrite ^/(\w+)/(\w+)$ /newestentry/request.php?taglist=user/$1/$2;
                rewrite ^/(\w+)/(\w+)/(\w+)/$ /;
                rewrite ^/(\w+)/(\w+)/(\w+)$ /newestentry/request.php?taglist=user/$1/$2/$3;
                rewrite ^/(\w+)/(\w+)/(\w+)/(\w+)/$ /;
                rewrite ^/(\w+)/(\w+)/(\w+)/(\w+)$ /newestentry/request.php?taglist=user/$1/$2/$3/$4;
                rewrite ^/(\w+)/(\w+)&(.*)$ /newestentry/request.php?taglist=user/$1/$2&$3;
                rewrite ^/(\w+)&(.*)$ /newestentry/request.php?taglist=user/$1&$2;

Who is Participating?

Improve company productivity with a Business Account.Sign Up

Michel PlungjanConnect With a Mentor IT ExpertCommented:
Install Firefox 3.6+ or 4.
Install Firebug or live http headers add-on

Load your url and follow the headers/urls requested
Michel PlungjanIT ExpertCommented:!/franks/34232157/1
does not look like a great url
can handle path info
is probably better

You cannot depend on anything after the # to be sent to the server correctly - it is for browser use only and for example some IEs will not even send it at all.
mendezcbcrAuthor Commented:
I understand that, but my client insists. I don't need it send to the server, just to stay on the URL without changing it.

What Kind of Coding Program is Right for You?

There are many ways to learn to code these days. From coding bootcamps like Flatiron School to online courses to totally free beginner resources. The best way to learn to code depends on many factors, but the most important one is you. See what course is best for you.

Michel PlungjanIT ExpertCommented:
Ahem.. If you stay in the browser, what changes the url for you then?
mendezcbcrAuthor Commented:
Actually what I need to know is if is a browser behaviour, which I don't think or if it happens on nginx configuration file, like in .htaccess redirection, and how can I stop it.

mendezcbcrAuthor Commented:
It lead me on the right path, but I still had to do some major digging in nginx configuration.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.