Solved

Anchor in URL redirection issue.

Posted on 2011-03-07
6
1,275 Views
Last Modified: 2013-11-30
Hello, so I have a problem, currently my site has direct URL with anchors for the HTML:

http://site.com/franks#!/franks/34232157/1

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

http://site.com/franks/34232157/1

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;


Thanks
0
Comment
Question by:mendezcbcr
  • 3
  • 3
6 Comments
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 35082804

http://site.com/franks#!/franks/34232157/1
does not look like a great url


http://site.com/franks/34232157/1
can handle path info

http://site.com/franks?34232157/1
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.
0
 

Author Comment

by:mendezcbcr
ID: 35082838
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.

Thanks
0
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 35082856
Ahem.. If you stay in the browser, what changes the url for you then?
0
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 

Author Comment

by:mendezcbcr
ID: 35119304
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.

Thanks.
0
 
LVL 75

Accepted Solution

by:
Michel Plungjan earned 500 total points
ID: 35120065
Install Firefox 3.6+ or 4.
Install Firebug or live http headers add-on

Load your url and follow the headers/urls requested
0
 

Author Closing Comment

by:mendezcbcr
ID: 35306108
It lead me on the right path, but I still had to do some major digging in nginx configuration.
0

Featured Post

Get up to 2TB FREE CLOUD per backup license!

An exclusive Black Friday offer just for Expert Exchange audience! Buy any of our top-rated backup solutions & get up to 2TB free cloud per system! Perform local & cloud backup in the same step, and restore instantly—anytime, anywhere. Grab this deal now before it disappears!

Join & Write a Comment

Suggested Solutions

If your business is like most, chances are you still need to maintain a fax infrastructure for your staff. It’s hard to believe that a communication technology that was thriving in the mid-80s could still be an essential part of your team’s modern I…
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now