I want to redirect pages from sitename/sitename/pagename.html and sitemap/sitename/ to
sitemap/sitename/pagename
how I can do that by using .htaccess
file
I tried this code
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule . /sitename/index.php [L]
RedirectMatch 301 (.*)\.html$ sitename/$1
</IfModule>
and I tried also to add
Redirect 301 sitename/sitename/
but it is not working
but I think both not working because it still gives me an error when I open www.sitename.com/pagename.html