Skip to main content

Remove Trailing Slash in WordPress

WordPress Administration is a versatile experience and it gives you some extra level flexibility to manage WordPress and consider the power of Open Source Content management system (CMS). I am going to remove trailing slash in WordPress with possible techniques. I am a lazy System Administrator and I always choose, the easy method to adopt but it’s up to your super genius’s nature that you adopt the easiest solution or go for the some extra efforts.
Suppose we have a WordPress URL like this: http://rizwanranjha.com/wordpress/ and we want to remove the trailing slash (aka - last slash) or / from the URL to make it more clean and to perfect your SEO efforts for your blog.

Remove Trailing Slash in WordPress

Removing Trailing slash in WordPress Dashboard, it is already quite easy and you simply need to do this
  1. Login on your WordPress Admin with your Administration Account.
  2. In Dashboard Section, Click on the Settings Menu.
  3. Click on Permalink under Settings Menu and this will take you the Permalink Settings page.
  4. Click on Custom Structure Radio Button and type /%postname%
  5. Click on Save Changes and Check with your Blog.

Remove Trailing Slash in WordPress using .htaccess

I am not the lover of tricky solutions but for the sake of knowledge and to entertain the expert level of users, I am including this solution as well.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteRule (.+)/$ http://rizwanranjha.com/$1 [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
For this, in some cases, need to create .htaccess file in the root path of your Wordpress Installation. This should work like a charm but you must make sure that you replaced rizwanranjha.com domain name with your own Domain Name.

Comments

Popular posts from this blog

Setting up per connection Limit Bandwidth on MikroTik Router

Generally, I do not prefer to add any unwanted restriction on the network user until its required due to some Administration reason. I know, there are more ways to tackle this setting up per connection Limit Bandwidth on MikroTik Router question comes into one’s mind but I resolve my concern while using MikroTik PCQs feature in MikroTik Queue Type and then calling this Queue Type to Simple Queue. There are more options for setting up per connection Limit Bandwidth on MikroTik Router but please share your concern to add anything else in this article. Let’s start to add our configurations; I am using WinBox for this Article but you can use anything you are convenient to use. Let’s start Step by Step procedure for Setting up per connection Limit Bandwidth on MikroTik Router, any version.  Setup Queue Types After Successful Login, click on Queues menu. Navigate to Queue Types and Press Add + (Plus Sign) to add a new Queue Type. Type a Name like in my scenario,...

The file is corrupt and cannot be opened" - error in Microsoft Office 2010

Mostly we have seen this error with email attachments, when a user gets an email in his / her inbox having, Microsoft Word, Microsoft Excel or Microsoft PowerPoint file in some older version. This error is not Microsoft Office bug, as so many blogs says but it is your security settings that are preventing Internet E-mail attachments to being opened at your computer. Secondly, this error comes to Lucky person J not everyone gets this error. Quick Fix , Open your Microsoft Word 2010, Microsoft Excel 2010 or Microsoft PowerPoint 2010 and try as under; 1. Open Microsoft Word, Excel or PowerPoint 2010. 2. Click on File > Options. 3. Select Trust Center > Trust center settings. 4. Select Protected view. 5. Uncheck “Enable Protected View for files originating from the Internet” under Protected View > OK. 6. Restart Microsoft Word / Excel or PowerPoint 2010 and try to open document. If you are unable to open your document with only this desel...

Linux Admin - Nginx Server Interview Question and Answers

What is Nginx Server? Nginx (pronounced "engine x") is an open source web server and a reverse proxy server for HTTP, SMTP, POP3, and IMAP protocols, with a strong focus on high concurrency, performance and low memory usage. What is the Best Usage of Ngins Server? Nginx can deploy dynamic HTTP content on a network using FastCGI, SCGI handlers for scripts, WSGI application servers or Phusion Passenger module, and it can serve as a software load balancer. What’s the Difference between Apache Web Server and Nginx? Nginx uses an asynchronous event-driven approach to handling requests, instead of the Apache HTTP Server model that defaults to a threaded or process-oriented approach. Nginx's event-driven approach can provide more predictable performance under high loads. Describe Some Best Features of Nginx? Simultaneous Connections with low memory, Auto Indexing, Load Balancing, Reverse Proxy with Caching, Fault Tolerance What is the Configuration File for Nginx and...