LATEST >>

Welcome Here And Thanks For Visiting. Like Us On Facebook...

EXEIdeas – Let's Your Mind Rock » WordPress / WordPress Tricks » How To Redirect Space(%20) To Dash(-) In WordPress Categories URL?

How To Redirect Space(%20) To Dash(-) In WordPress Categories URL?

How-To-Redirect-Space-To-Dash-In-WordPress-Categories-URL
If you migrate rom Blogger to WordPress, you have a lot of setting to do must and if you will skip them then your blog will go down badly. From SEO to changing permalink to adding same setting, you have to do it must as WordPress is totally different from Blogger.

Like in BLogger, your labels URL is shown as http://www.example.blogspot.com/search/label/first%20second but in WordPress, its like http://www.example.blogspot.com/category/first-second. So now you can change search/label/ to category/ by going through our previous post about How To Redirect Blogger Label URL To WordPress Category URL? but now here we will share about How To Redirect Space(%20) To Dash(-) In WordPress Categories URL?

The below code will only work when your URL will be like http://www.example.com/category/first%20second but not when http://www.example.com/first%20second that is awesome means it will not effect your WordPress blog other setting. So now move on and garb the code and remove all your Google WebMaster errors and 404 errors too and make your SEO as it was.

How To Redirect Space(%20) To Dash(-) In WordPress Categories URL?

Step 1:) Open your web-hosting account panel.
Step 2:) Go to your WordPress hosting folder.
Step 3:) Find .htaccess file there.
Step 4:) Edit that file and add the below code there.

## Redirect %20 To - In URL ##
<ifmodule mod_rewrite.c>
RewriteEngine On
RewriteRule ^/?category/(.*)\ (.*)$ /category/$1-$2 [L,R=301]
</ifmodule>
## Redirect %20 To - In URL ##

Step 5:) Always add your new code at the top of .htaccess file.
Step 6:) Save and done.

Recommended For You:
5 Best Caching Plugins For WordPress-Based Websites

.htaccess File Editing Warning:

When you are editing .htaccess file then keep in mind that you have to start adding your new codes at top. After that, check your site that code is working or not. Then also check your all rest and pre added codes that are they working or not. If not working then add the new code below them.

Last Words:

This is what we have and shared in easy steps for newbies so that they can easily know how it works. Stay with us because we are going to share a whole guide step by step about WordPress and make it easy for you. If you liked it then share it and be with us to get next tutorial. If you have any problem then feel free to ask us. We will help you with what we can or have.

You Like It, Please Share This Recipe With Your Friends Using...

2 Responses to “How To Redirect Space(%20) To Dash(-) In WordPress Categories URL?”

  1. iliyas shaikh says:

    assalamu alaykum
    muhammad bhai nice article.. but how to do in blogspot please how to use this trick in blogspot

Leave a Reply

Your email address will not be published. Required fields are marked *