Wordpress pages redirecting to Home page - php

I have a wordpress website at http://www.wjewel.com/ . All the pages of the website are getting redirected to home page. There is no .htaccess file or web.config file for redirections. Can someone please guide me what could be the reason for this issue.

Resetting the permalinks within WordPress will resolve this issue.
To reset the permalinks for your WordPress installation:
Log into the WordPress Dashboard.
In the side panel, go to Settings > Permalinks.
Make note of the current setting. (If you are using a custom
structure, copy or save the custom structure somewhere.)
Select the Default option.
Click Save Changes.
Now select the previous setting you had before Default was selected.
Click Save Changes.

Redirection is done on client side. You have this meta tag in the html head.
<meta HTTP-EQUIV="REFRESH" content="0; url=http://www.wjewel.com">
(It has nothing to do with PHP headers)
I'd try to look for plugins injecting that meta tag or theme header.
Also just an observation - html body on /about/ page (for example) is empty.

I had this issue today and found that Yoast SEO have a permalinks setting which had two of my pages listed as redirect to home page.
I don't recall myself setting them up, but thankfully there was a button to delete those pages from that list.

Old question but I had the same issue and tried all solutions with no luck. Even deleting htaccess didn't work. I changed my settings to set latest posts as my homepage and then changed it to the desired page and that did the trick (at least for now)

fixed
I had a similar problem.
But only some selected pages were redirecting to home. And these pages which were redirecting worked on page no. permalink setting.
Tried everything as mentioned above, nothing worked.
I cleared my browser cache and it was all good again.

Related

wp-login broken admin redirect

I have two Wordpress sites in two different languages.
The second one was cloned from the first one. Everything is good and the site looks the same. The issue starts when I log into the admin panel of the second site.
By logging into www.mysite1.com/wp-login.php the redirect will be www.mysite1.com/wp-admin/index.php
Instead the second site redirects me to www.mysite2.com/wp-admin the issue with this is that I have to manually modify the link to edit posts for example. If I go on and clock the posts link in the left sidebar it will take me to www.mysite2.com/edit.php instead of keeping the same structure as site 1 - www.mysite1.com/wp-admin/edit.php
I have to mention that I have already set siteurl and home options to being www.mysite2.com before migrating.
I have found the solution to it in the wp-config.php file. $_SERVER['HTTP_HOST'] should be set to 'www.mysite2.com'

Woocommerce shop page redirects to wp-admin

At some point, the shop page started to redirect to the wp-admin (admin backend) page. I don't know why.
Commonly proposed solutions include:
Delete the shop page, and add it again using the WC > Status > Tools > Create default WooCommerce pages.
Make sure the WP URLs are set correctly.
Neither had any effect. The shop page URL is currently at https://website.com/?page_id=88, reflecting the number of times I tried remaking default pages.
I have also tried adding some text to the page, though it should normally be empty. This had no effect.
Ran out of ideas to try. The rest of the website mostly works.
Possibly related annoyance bug: the shop automatically adds the first product to the cart whenever one visits the site. Somewhat annoying, but not disastrous.
Versions:
WooCommerce 3.2.6
Wordpress 4.9.1
The bug seems to be fixed by changing the Home page to the Shop page in the WP settings > reading.
Unfortunately, this workaround doesn't fix the underlying issue entirely because the bug resurfaces if one selects the front page instead of the shop as the home page.
I'm not able to add a question/comment, so I'll try to add this as an answer...
If you are using IIS and have setup your site as a virtual application, this may cause this error. I had this same thing during testing. Once I created the website as it's own proper website and accessed it properly, this fixed the issue for me.
I had this issue and fixed it clearing browser cache
I hope it helps

Wordpress template suddenly not displaying - permalink issue?

I'm having a strange issue with one of my pages where in the backend I have a custom template selected but it's showing the single.php for the associated page.
The template worked absolutely fine before and when I changed the url of the page to something else, suddenly the template appears on the live site. But now I change the url back and it doesn't show again.
I've tried resetting permalinks and made sure that my htacess file has the right configuration but still no luck. Obviously it's not convenient to have to keep changing the page url! Any suggestions would be appreciated.

wordpress page redirect to 404 after changing the site

I created a wordpress site, you can check it here http://www.enterhelix.com/shan/wordpress4.5/ , as I wanted it to be in a separate domain, so I created a domain http://www.pioneersurgicalsystems.in/ and copied all files and folder in the root of pioneersurgicalsystems.in including DATABASE. If you open pioneersurgicalsystems.in/ in your browser it will open, but if you click in any categories then you will be redirected to 404 page. After Googling I found a solution and edit config.php file and added
define('WP_HOME','http://www.pioneersurgicalsystems.in');
define('WP_SITEURL','http://www.pioneersurgicalsystems.in');
and edited functions.php file of my theme and added the following code
update_option('siteurl', 'http://www.pioneersurgicalsystems.in');
update_option('home', 'http://www.pioneersurgicalsystems.in');
But still it does not work, everything is okay and working fine in the first link, but it is not working in the second link in which I want the site to be hosted, can anyone help me..?? Thanks
Could you please save permalink again?
Step 1 : Goto wp-admin->setting->permalinks
Steps 2 : After save changes
If you are able to login in admin and only home page is open. other pages in not able to open then please first login to admin. and then from setting menu go permalinks menu and there from first select other option again select format (like post name) which you want like this way new .htaccess is created your problem will solved.try this your problem will solved
go to Settings->permalinks save your Permalink Settings.

Wordpress permalink one page opens Home instead of actual page

I have following weird problem in Wordpress using permalinks.
When I use the default setting for permalinks, everything works just fine.
But I want to use the post name as permalink.
When using the post name, one link opens the home page instead of the actual page.
Manually changing the permalink in the page settings leads to a 404 Error.
I dont think this is the problem but the links form the pages have some similarites:
Home page: www.website.com/name1/
Site with problem: www.website.com/name1/index.php/name1/
What makes it even worse: when i set the parent of the page to home, everything works.
Changing the permalink manually to another string worked in the end.
Might be a bug from wordpress with same names.

Categories