Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

Duplicated Permalink in URL WordPress

  • SOLVED

My website has duplicated URL's when in the URL bar and 'escaped fragments' when going to an unknown page. E.g:

http://8interactive.com/#!http://8interactive.com/learn-to-read-app/

and upon entering an unknown URL:

http://8interactive.com/_w/?_escaped_fragment_=?_escaped_fragment_=?_escaped_fragment_=?_escaped_fragment_=?_escaped_fragment_=?_escaped_fragment_=?_escaped_fragment_=?_escaped_fragment_=?_escaped_fragment_=?_escaped_fragment_=?_escaped_fragment_=?_escaped_fragment_=?_escaped_fragment_=?_escaped_fragment_=?_escaped_fragment_=?_escaped_fragment_=?_escaped_fragment_=?_escaped_fragment_=?_escaped_fragment_=?_escaped_fragment_=http://8interactive.com/error/

I think this is because I had an alternate version of wordpress on the same domain (8interactive.com/test/) as this had the correct URL behavior.

My questions is, how do I fix this? I want the URL to be:

http://8interactive.com/#!learn-to-read-app/ (the #! is unavoidable apparently due to how this theme is built)

I had the same version of the theme installed on a 8interactive/test/ directory and think it may be a database setting. I want to avoid having to re-install the theme as it will take hours.

More info below:

The theme is: http://themeforest.net/item/right-now-wp-full-video-image-with-audio/1575990
My general settings are attached.
My Permalink settings are: http://8interactive.com/sample-post/

Only 3 plugins:

All In One SEO Pack
WPtap Mobile Detector
WP-PageNavi (a 'must' for this theme to work)

I have disabling these previously with no success on fixing the URL.

The .htaccess file is:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>


Thanks

Answers (4)

2013-10-18

Eric P. answers:

That's the way the theme you are using is designed.

It's designed as a "single page" website with AJAX to load the other pages.

Unfortunately, that makes it where you can't go directly to a page with a URL like http://8interactive.com/learn-to-read-app/ and instead you have to use the http://8interactive.com/#!http://8interactive.com/learn-to-read-app/ format. That loads the main page from http://8interactive.com/ and pops up the http://8interactive.com/learn-to-read-app/ within that page.

Those type of themes can be horrible for SEO, and can make navigation difficult on devices with JavaScript turned off or with no available JavaScript (rare these days).

Having said that, there seems to be a bug in the them. It should redirect to the proper URL automatically, but it's hanging up in a redirect loop.


Eric P. comments:

It's definitely your theme, but something else has broken it. Do you have any plugins that deal with permalinks?

When I go to the theme developer's page for your theme, his "permalinks" automagically change into those "?_escaped_fragment_=" urls.

For example, http://www.renklibeyaz.com/rightnowwp/company/ changes to http://www.renklibeyaz.com/rightnowwp/?_escaped_fragment_=company/

I'm not sure if the theme is relying on .htaccess entries to do that, or if it's using the redirector functions in WordPress.

If you want me to take a look, I'll need access to your site. [[LINK href="http://www.wpquestions.com/account"]]Check your messages here and respond privately[[/LINK]].


Eric P. comments:

WordPress URL Address should not have the /_w at the end.

How many plugins are you using? Which plugins?


timdej comments:

Hi Eric,

Only 3 plugins:

All In One SEO Pack
WPtap Mobile Detector
WP-PageNavi (a 'must' for this theme to work)

I have disabling these previously with no success.


timdej comments:

The /_W was put there previously by a dev shop to make the site more 'secure'. It has have had several different themes installed with no problem.


Eric P. comments:

Tim, I realize you can install WordPress core files in a different directory, and run things with "WordPress URL" different from "Site URL".

Very few people do that. I don't think the author of your theme understood that possibility either. So he has confused SiteURL and WordPressURL somewhere in his theme.

I gave you my email address. If you want, I can see if I can figure out where the error is. But I don't have that theme, and I'm not going to buy it to debug it for you. ;) If you want me to look, I either need access, or I need you to email me the zip file for the theme (the version you are running).


Eric P. comments:

There is definitely a problem with your theme. Somewhere in there, the theme is redirecting those URLs, and it's using get_home_url() to build the redirect when it should use get_site_url().

The get_home_url() function gets the "WordPress Address URL" from the settings->general page, and the get_site_url() function gets the "Site Address (URL)" from the settings->general page. Many developers think those are interchangeable, and for 99% of the WordPress installations out there, they are identical.

Good OpenSource themes will usually get corrected, but when someone develops a "premium theme" and doesn't fully understand, the error goes uncaught until someone like you, with different URL's for WordPress and the Site, uses the theme and discovers the error..


Eric P. comments:

Another possible work-around might be accomplished in your .htaccess. Immediately after the "RewriteBase /" line, before the other "RewriteCond ..." lines, try this:
RewriteCond %{REQUEST_URI} ^/_w/$
RewriteCond %{QUERY_STRING} ^_escaped_fragment_
RewriteRule ^.*$ /?${QUERY_STRING}


That might or might not work, but the real problem is that your theme is using get_home_url() when it should use get_site_url(). The reason it worked on your test site is because on that site, they are the same URL for WordPress and for the Site.

2013-10-18

Remy answers:

What are your URL settings in the settings-> general page ? What theme are you using ?

2013-10-18

Galia Bahat answers:

Looks like a plugin has gone awry - something that lets you load new pages without refreshing. URLs with #! and with escape fragments are used for that. Your theme seems to have that feature. Try disabling it, if possible, at least to check if that's the culprit.

Or maybe someone added a line to your .htaccess file (yes, it starts with a period :) ) in your WP or website main directory. Something starting with "redirect" or "rewriterule".

2013-10-18

Navjot Singh answers:

N/A. Posted the answer in the wrong question. Sorry.