Possible Duplicate:
URL Fragment and 302 redirects
I need to help regarding the 301 Redirect without Special character.
For example, I want to redirect the following URL:
http://www.iphoneapplications.us/iphone-ipad-mobile-apps-portfolio.html#Gigguid
To the following URL:
http://www.i-phonedeveloper.com/portfolio.html
I have changed .htaccess
to perform the redirect, but the fragment #Gigguid
remains in the final URL. How can this be fixed?
you can Use This code In htaccess
sample :
http://www.iphoneapplications.us/iphone-ipad-mobile-apps-portfolio.html?id=3#Gigguid
redirect to:
http://www.i-phonedeveloper.com/portfolio.html?id=3#Gigguid
The current HTTP standard does not allow you to do such a redirect - at least the HTTP client is refusing to do so. Your browser will always add the
#...
part to the redirect URI.This
#....
is called Fragement by the way, special character is not saying much (a URI has many special characters like:
,%
,?
and&
), better use the right name for this.The next HTTP standard release will likely take care of that issue but it's still a bit fragile, the meaning has changed sometimes in the draft and as I can not look into the future it's yet too early how this will be done with the next stable release of HTTP.
See as well this question for more information: