Wordpress Custom URL rewriting - wordpress

I need little help for url rewriting in wordpress.
basically what i need:
mydomain.com/mysomewordpresspost
mydomain.com/parentpage/subpage
to
mydomain.com/global/mysomewordpresspost.
mydomain.com/global/subpage
Basically want to add "global" in url
and also for subpages, categories, post etc etc.
mean all long url short to "global"
No want to show categorname in url and parent page name in url.

You can do this easily, Just add like this in your Permalink Settings->Custom Structure
/global/%postname%/

Related

Custom taxonomy rewrite rule

Hello i want to change the default WordPress categories url i tried but i don't know how to do it
can you guys please help me with that..
This is my admin URL of default post category here post type=post
/wp-admin/edit-tags.php?taxonomy=category
example of my categories list
cloths, shirt, goggles etc...
suppose current my fronted link for taxonomy url is like
example.com/shirt
example.com/cloths
example.com/goggles
but i want to modify it... like below
example.com/ethic/shirt
example.com/ethic/cloths
example.com/ethic/goggles
And post Url must be followed same as below
example.com/res-full-shirt
example.com/blackfull-goggles
I think, these permalink settings will do the job.

Is it possible to automatically add a slug to an already existing URL once permalink structure has been changed?

I am running a website in which the different posts all have an associated category: let's say, news, reviews, videos, etc.. We want to change how URLs are generated to incorporate the category before postname.
I will put an example:
old url: https:///www.myweb.com/amazing-new-car (with category in the post being news)
new url: https:///www.myweb.com/news/amazing-new-car (with category in the post being news)
I know how to do this by changing permalink structure in the wordpress settings to /%category%/%postname%/ but the problem is that this is applied to older entries too so when i try to access https:///www.myweb.com/amazing-new-car it gives me a 404 error. The problem here is that we have links to parts of our site sent to people, social networks and so and if they use them they will see this 404 error.
I've tried to use Redirection plugin to create a rule that can redirect old URLs to new URLs but it does not work (i've tried even wildcard redirection).
My question is: is there any way to do what i want rather than individual renaming of the links?
Thanks in advance, i hope i've explained well my problem
WordPress has all the tools necessary to make this change happen, and typically it does successfully redirect the slug from /slug to /news/slug
If you have added a category and haven't touched permalink settings, this is probably your problem.
Once you add a new category or post type into Wordpress, you should go into the Permalink settings and just click save. No need to change the settings if you are happy with them...

Rewrite rule parameter htaccess from custom CMS to Wordpress

I am moving a website from a custom CMS to wordpress and have an issue with some custom rewrite URL that I need to match for SEO purpose.
Original url looks something like this
/search?Filter=filter1,filtervalue1&Filter=filter1,filtervalue2
filter1 correspond to a WP Taxonomy
filtervalue x correspond to the taxonomy term to search for.
In this original URL, mulitple can be added, so the URL can expand indefinitely, like Filter=filter1,filtervalue1&Filter=filter1,filtervalue2&Filter=filter4,filtervalue6&Filter=filter8,filtervalue25 etc etc
I need to find a way of Rewriting the url to match the taxonomies in Wordpress, so in some way extract each value of Filter= and then the taxonomies
something like
/search?filter1=filtervalue1+filtervalue2&filter4=filtervalue6 etc etc
I can't get my head around it and will appreciate some help
thanks in advance

WordPress rewrite post url to keep page url

I was wondering if it's possible to rewrite the url of a post to keep the current url as permalink and add the post name at the end of current url. I ask this because I've created a custom WP_Query and integrated that in a page.
So I want the url to be like http://sitename.me/pagename (here is the custom query) and the post link would look like http://sitename.me/pagename/postname instead of sitename.me/category/postname.
Do you have any suggestions how can this be achieved?
Thanks,
Ciprian
You are asking to fetch someone with out knowing their identity!
You will have to send the postname some way or the other. May be through Input Type=Hidden and fetch it from the query-string.

Wordpress, two URLs for the same post

Is it possible to have two URL for a same post in wordpress.com?
One would be a short URL like
http://mydomain.com/28
and the other will be a SEO friendly one:
http://mydomain.com/28-this-is-the-post-about...
thanks
In wordpress, all posts are at the URL mywordpresshome.com/?p=xx where xx is the post ID number. Anything else involves mod_rewrite. WordPress will do one type of rewrite for you in the Admin section -- so you can pick either the short version or the long one above. In the Admin interface, it won't let you do both. But you could edit mod_rewrite yourself and effectively get both patterns -- short and long -- to work.
Here's info on mod_rewrite: http://www.workingwith.me.uk/articles/scripting/mod_rewrite
In the Settings->Permalinks part of the admin panel, you can set the look of your permalinks, but that doesn't mean the default dynamic links (yourblog.com/?p=5 or whatever) will stop working. You can use those links too and they will take you to the corresponding page. However, Wordpress will automatically substitute the dynamic link by its SEO-friendly alias.
I'm not sure whether it's possible to have two different aliases for the same post though.

Resources