I want to rewrite a page template url via .htaccess from www.xxx.com/pagename?id=1&name=2 to www.xxx.com/pagename/1/2.
The original URL works but not the rewrite url.
please help
Can you provide what you've tried achieving the task? Otherwise have you tried the permalink in the settings to "Post name".
Related
I have a website running wordpress with some good amount of posts.
For a specific reason, i setup my wordpress permalinks structure to /%post_id%/%postname%/
Now i want change my permalink structure to /%postname%/ for supporting a plugin Category Subdomain Pro
When i change the change the permalink structure, new links are working but i am getting a 404 error for old urls.
So, i am thinking about redirecting old urls to new urls.
If you know anything about this, please share something and help me resolve this issue.
Sorry for delay, Check this out... Before # BEGIN WordPress in .htaccess file put this code...
Redirect 301 /post_id/postname/ http://example.com/postname/
just replace post_id,postname to your website posts id and post name. Replace example.com with your website name and postname with your postname.
replace for every single post
or you can use plugin Redirection
I am changing permalink structure from
http://www.example.com/blog/index.php/2017/04/17/reasons-high-anxious-levels/
to
http://www.example.com/reasons-high-anxious-levels/
by going in settings>permalinks>change URL structure.
And on visiting to blog then it redirects me to 404 error page.
Please suggest how to achieve this
You can use SEO Redirection for the url's you have changed. You can use the plugin
https://wordpress.org/plugins/seo-redirection/
I currently have a website using the permalink structure:
http://xxx.xxx/%postname%/
I want to change this to:
http://xxx.xxx/xxx/%postname%/
So basically giving the default post type a slug rewrite like you can with CPT.
However, as we all know all the indexed pages will 404 so I need to write some HTACCESS to but not sure what I need.
If I use the following then all pages are re-directed too:
RedirectMatch 301 ^/([^/]+)/$ http://xxx.xxx/xxx/$1
Where as I just want the default post type re-directed.
Thanks
This cannot be done, you need to completed 301 redirects for each post and tag.
Have blogged about my process here: http://www.chewx.co.uk/2015/wordpress-permalink-update-from-postname/
If anyone can think of a better way, let me know.
I have a Wordpress blog in which I want to rewrite the post titles. The problem is that the permalinks will change, since they're based on the title, and inbound backlinks that reference the url that was created from the original title won't work.
What I need to do is rewrite the titles, but then create pages with the original permalink urls that redirect the reader to the new title, so that backlinks keep working.
Any ideas how to do this?
The best way I can think to do it is to add rules to your .htaccess or vhost file for Apache (or whatever http server you are using).
You can find many examples on the web using mod_rewrite.
Redirecting and Remapping with mod_rewrite
Doing a quick Google search on "wordpress permalink redirect" also turns up many result so how to handle this type of issue.
I'm changing my URL structure from domain.com/postname to domain.com/type/postname
What's the best way to redirect? I tried using the Redirection plugin, but it seems that I need to redirect each URL manually. Is there any way to redirect all the posts at once?
Go to the wp-admin's dashboard using domain.com/wp-admin. Then look for the Settings-->Permalinks option. From this page you can change the URL settings for all of your posts.
Here are some instructions on how to redirect your sites url.
Changing the site url
Back up your site first if you still can? When I changed to pretty permalinks I had to include a forward slash to custom field images.
from: wp-content/uploads/2012/08/tulip-813-01.jpg
to: /wp-content/uploads/2012/08/tulip-813-01.jpg