I need to rewrite url where the url is :

http://www.domainname.co.uk/blog/gallery/gallery2 -> URL1

which need to be

http://www.domainname.co.uk/gallery/gallery2 —> URL2

where http://www.domainname.co.uk/blog is a directory with wordpress installed.
Now when i enter URL2 it should show the content of URL1.
Is it possible? I just need to remove the word blog.

Any Help is appreciated.


———-my .htaccess———

RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

RewriteRule ^(gallery/.+)$ /blog/$1 [L,NC]

Read more here: url rewritting using .htaccess for unwanted words removal


If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Wordpress related questions and answers: