1

I had moved my website to one step back. So before that the link was www.example.com/abc/test.php, but now the link is www.example.com/test.php.

I want to remove the abc folder name from the links, if any user visit the links containing the abc folder I want to remove abc folder from it.

I have tried

Options +FollowSymLinks -MultiViews
RewriteEngine On
RewriteBase /
RewriteRule ^abc/(.*)$ /$1 [L,R=301] 
Jørgen R
  • 10,568
  • 7
  • 42
  • 59
Rahul Patel
  • 81
  • 2
  • 10
  • This link will helpful to you http://stackoverflow.com/questions/18973058/how-to-remove-folder-name-from-url-using-htaccess – Krishna38 Apr 17 '15 at 07:08

1 Answers1

1

This works for me:

RewriteEngine On

RewriteRule ^abc/(.*)$ /$1 [L,NC,R]
v1k45
  • 8,070
  • 2
  • 30
  • 38