Wordpress Permalink Hidden Link - wordpress

Wordpress' permalink structure means that even if you don't put in the exact URL it redirects you to the most similar URL if there's something similar.
E.g.
Permalink = http://test.com/this-is-a-test-site-asdr5646/
Navigating to http://test.com/this-is-a-test-site/ would take you there.
This usually is suitable but I want to created hidden posts that are only accessible by using the exact URL, is this possible without creating a complex non-pretty URL?

Related

For each WordPress page of my site why I have two URLs?

In my website, I set the custom structure permalink to "/post/%postname%". I want the URL of a single blog post like domain/post/postname and it is working fine but in addition to this every page of the website following both domain/post/pagename and domain/pagename URLs but for pages, I only want domain/pagename.
Both of these URLs landing on the same page
https://shergroup.com/aboutus
https://shergroup.com/post/aboutus
I only want https://shergroup.com/aboutus for pages.
Change permalinks from setting to http://localhost/yoursitename/sample-post/
On pages, the simple posts will be changed to the page names.
And in your website, if you want to show a blog page like https://shergroup.com/aboutus/blog/ for that you need to change the slug of the web from /blogs/ to aboutus/blogs in a page but in my opinion, it's fine.
Change Permalink common and optional settings (both), then you will get desired url structure.
Path : Setting > Permalink

Will plain style permalinks continue to work after I change permalink settings?

I've had my WordPress site for about a decade now, and originally I never set any custom settings for permalinks, so my permalinks are all of the form /?p=123.
I'd like to start using permalinks that incorporate the post name in the URL. It looks easy enough to change this. It's my understanding that WordPress will likely update all my permalinks internally, but there exist a lot of external links to my site that point to existing permalinks, and I don't want those to stop working.
Will WordPress keep supporting visits to old plain-style permalinks if I change the setting? It seems like it should be able to since it's just using a URL query param and the other permalink styles use the URL's path, but I don't want to assume it does and be wrong.
And if this is not the case, is there a straightforward way I can set up the redirects? I have hundreds of posts and it would be tedious to make a manual redirect for each one.
Update: yes, the plain style permalinks keep working after you set another structure for your permalinks. They will redirect.

Custom URLs using .htaccess - WordPress

I've tried for ages to find a solution to this but to no avail.
In a nutshell...
I have a WordPress site within which I have a few pages that I want to change the URLs for. I don't want them to be custom post types if it can be avoided, I wish to use my theme's standard page templates without having to change or add any.
Can this be achieved simply using .htaccess? All my attempts have resulted in 404s so far. I've seen in the codex that you can do similar but not 100% sure how this works with pages instead of posts.
Note that I don't want a redirect, just to change the URL.
Example:
domain.com/page-reviews
I wish to be...
domain.com/page/reviews
The rule will always be the same, effectively anywhere that 'page-' appears, I need the dash to be replaced with a slash - 'page/'
Thanks to anyone who can help!
You can't do it through any .htaccess modification, if you are going to rewrite your slugs externally from Wordpress you will end up having 404 errors (or 500 or even a redirect loop, in the worst case scenario). Wordpress will look through its entire database searching for the matching requested path, which obviously would be inexistant.
If you want your pages to sit under a section, let's say /page/ you can easily create a Page with the slug page and then a child page with the slug reviews, so your final page will show the /page/reviews page, you need however to edit each page to amend the slugs where necessary.
If you are, however, using Posts then just use the Custom Permalinks plugin, it allows you to rewrite and add slashes into the full slug in the edit post screen, also in this case you need to go through all posts and change the slug pattern.
We've been using it flawlessly for about the last 2 years in a blog of a big corporate, however keep in mind the author is not maintaining it anymore so it might break at some point in the future and probably you might need to readapt it.

Wordpress url not including category on main page

I am new to wordpress so trying to figure out something which I cannot and asking you guys. Please help if you know.
I have issues with URL formation in Wordpress. I want to show articles' category name in URL, so I am using Permlinks -> custom structure which is like /%category%/%postname%.htm I then pasted code given by WP in .htaccess file. So now articles use http://mysite/category1/article1.htm URL.
But then on index.php any links inside article shows URL ashttp://mysite/article2.htm and hence 404. I am using >Article2 inside a post. If I open http://mysite/category1/article1.htm then above link will show as http://mysite/category2/article2.htm which is the correct URL.
Can someone plese help me figure out correct way? Using above configuration, it works fine for all links when open individual posts but only main index.php does not include category name. Just to note, URLs in Recent Posts also show correct URL.
If the links are hardcoded inside the article itself, there's nothing inside WordPress PHP or settings to change. You just need to edit the post content and update the HTML link URLs using the new permalink structure, within Posts and/or Pages tab.
You can also try a plugin like Redirection which will redirect old post permalinks to the new (correct) permalink format.
http://wordpress.org/plugins/redirection/

Format wordpress posts to use post title in URL instead of numeric autoincrement?

All my blog post URLs currently look like this: http://www.HeyItsMyBlog.com/?p=368
I want to change the URLs so instead they look like http://www.HeyItsMyBlog.com/2010/11/new-kittens-omg/
This is an easy change in the WordPress admin panel, but there are a bunch of people who have linked to my currently-formatted URLs around the web. How can I make the transition and ensure that it won't break the old links?
The latest version of Wordpress automagically interprets URLs of the form ?p=777 by redirecting the user to the corresponding pretty URL. You don't need to do anything special beyond enabling pretty URLs in the admin panel.
It works either way (when you set the permalink to your desired one). Test it of course. And oh, this question belongs to http://wordpress.stackexchange.com

Resources