Welcome to WebmasterWorld Guest from

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

how to redirect ajax to wordpress

how to redirect ajax to wordpress



7:46 am on Oct 24, 2013 (gmt 0)

Hi Guys,

It has been three days i've been trying to redirect ajax url to wordpress. i've tried almost everything but nothing seems to work.
i want to redirect: example.com/#!about3/c1uy6 to example.com/about-us/

we need to do it as soon as possible because most of the pages are indexed by google.
Thanks in advance.

[edited by: bill at 8:53 am (utc) on Oct 24, 2013]
[edit reason] use example.com for URLs [/edit]


11:56 am on Oct 24, 2013 (gmt 0)

WebmasterWorld Administrator 5+ Year Member Top Contributors Of The Month

Could you post a few examples of what you have tried?

NOTE: In examples, replace your domain name with example.com


4:25 pm on Oct 24, 2013 (gmt 0)

Hi aakk9999,

i've tried the following codes:

RewriteCond %{QUERY_STRING} (^|&)_escaped_fragment_=about3(&|$)
RewriteRule ^$ http://www.example.com/about-us/ [R=301,L]

and i've tried 301 redirect too with no escape.

[edited by: phranque at 4:58 pm (utc) on Oct 24, 2013]
[edit reason] disable graphic smile faces [/edit]


8:16 pm on Oct 24, 2013 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month

In my experience the "#!about3/c1uy6" part of the URL will not even be sent to the server (at least its not in Firefox). So a standard mod_rewrite will not work in this case.


8:07 am on Oct 25, 2013 (gmt 0)

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

On a non-ajax site a straightforward request for
will result in a
GET / HTTP/1.1
request to the server with the browser expecting to find an in-page named anchor called
to scroll down to.

Search engines will not treat
as duplicate content. They will treat them both as being the root home page.

In this case, the OP wants a request for the old Ajax URL to redirect to a different place. The only way this can be done is by ensuring there is some javascript on the root home page that can detect the
part in the browser address bar and then act on it.

This javscript could simply cause the browser to make a new request for the new URL, or it could send an Ajax-like request to the server that causes it to issue a proper 301 redirect. Which one you do depends on whether this is for visitors using a browser or for search engines as well.

In any case, your pattern ending
would never match the URL request given in the example as there's


4:37 pm on Oct 26, 2013 (gmt 0)

Thanks g1smd. I'll try to redirect it using javascript.

Featured Threads

Hot Threads This Week

Hot Threads This Month