Hi there,
I have a site that has many .html pages in the root folder. In order manage them, I have put them into folders. When accessing a page the URL looks like the following examples:
www.example.co.uk/folder/page.html
www.example.co.uk/folder/anotherfolder/anotherpage.html
I would like a rewrite so that when the above pages are accessed the URLs are permanently (R=301) redirected and rewritten as:
www.example.co.uk/page.html
www.example.co.uk/anotherpage.html
I have used the following code:
RewriteRule ^folder/(.+)$ http://www.example.co.uk/$1 [R=301,L]
However, this is just redirecting rather than rewriting the URL.
Any help would be much appreciated,
Many thanks!