Solved

Anchor in URL redirection issue.

Posted on 2011-03-07
6
1,323 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
Connect further...control easier

With the ATEN CE624, you can now enjoy a high-quality visual experience powered by HDBaseT technology and the convenience of a single Cat6 cable to transmit uncompressed video with zero latency and multi-streaming for dual-view applications where remote access is required.

 

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

Easy, flexible multimedia distribution & control

Coming soon!  Ideal for large-scale A/V applications, ATEN's VM3200 Modular Matrix Switch is an all-in-one solution that simplifies video wall integration. Easily customize display layouts to see what you want, how you want it in 4k.

Question has a verified solution.

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

FAQ pages provide a simple way for you to supply and for customers to find answers to the most common questions about your company. Here are six reasons why your company website should have a FAQ page
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
The viewer will learn how to dynamically set the form action using jQuery.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

749 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