Solved

Anchor in URL redirection issue.

Posted on 2011-03-07
6
1,301 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
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 

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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

When you try to share a printer , you may receive one of the following error messages. Error message when you use the Add Printer Wizard to share a printer: Windows could not share your printer. Operation could not be completed (Error 0x000006…
Developer portfolios can be a bit of an enigma—how do you present yourself to employers without burying them in lines of code?  A modern portfolio is more than just work samples, it’s also a statement of how you work.
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

777 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