Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Anchor in URL redirection issue.

Posted on 2011-03-07
6
1,310 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
The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

 

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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Most of the applications these days are on Cloud. Cloud is ubiquitous with many service providers in the market. Since it has many benefits such as cost reduction, software updates, remote access, disaster recovery and much more.
An enjoyable and seamless user experience can go a long way on an eCommerce site. While a cohesive layout and engaging copy play roles in creating a positive user experience, some sites neglect aspects that seem marginal but in actuality prove very …
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
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…

837 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