Wordpress permalink one page opens Home instead of actual page - php

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.

Related

Wordpress Redirects Pages to a weird permalink

I have a Wordpress website it started acting weird.
When ever any page from menu is clicked like domain.com/about-us it gets redirected to domain.com/?q=%2Fabout-us%2F and does not open page.
It stays on the same page.
a CURL -I returns this:
So i dont know where this redirect is setup.
I have tried changing permalinks to %postname%.
I also know permalink only affect posts not pages but not sure.
There's no redirection plugin either there.
I need someone to help me finding the issue.

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 pages redirecting to Home page

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.

Wordpress admin area canonical url trouble

I'm building a custom theme, with a custom post type. If I want to use the WordPress pager in the back end - to navigate between pages of posts - the URL it directs me to is wrong and I don't know where to even begin.
So the dev url is set up as
http://socor.dev
when I want to go to page 2 of the pages the URL should be:
http://socor.dev/wp-admin/edit.php?post_type=page&paged=2
however the domain part of the URL is being stripped out and I'm left with:
/wp-admin/edit.php?post_type=page&paged=2
I noticed when looking through the front end code that this has been set:
<link id="wp-admin-canonical" rel="canonical"
href="http:///wp-admin/edit.php?post_type=page&paged=2">`
I am running the latest version of WordPress 4.5.1
In case anyone comes across this, I've managed to work out what was going wrong.
I had managed to overwrite my domain name somewhere. I used:
var_dump($_SERVER['HTTP_HOST']);
in my functions file to see what I had it set as.
It was weird because the admin area would load up fine in the first instance but would go through 404's and other errors when navigating through additional post pages.

Permalink redirect issue in WordPress

My WP website is currently set to use the following permalink structure:
http://websitename.com/%postname%/
If I change that it to:
http://websitename.com/%year%/%monthnum%/%day%/%postname%/
everything works correctly. Specifically, older blog posts posted elsewhere (e.g. my FB page) redirect to the new URL automatically.
However, if I use a custom permalink structure and set it to the following:
http://websitename.com/blog/%postname%/
the redirect does not work on older posts. That is, I can still access all of the posts from the site, but if I linked to one of my blog posts on my Facebook page, for example, the old URL produces a 404 and does not redirect. I am thinking it has something to do with "blog" not being one of the variables that WordPress recognizes.
Any thoughts on why this is happening, and how to fix it?
Thanks in advance!
You can use wordpress quick redirect plugin for redirection
http://wordpress.org/plugins/quick-pagepost-redirect-plugin/
It is simple to use

Categories