I want to redirect an entire duplicate directory to the same files in the directory above the dup_folder.Redirect Code in .htaccess:Redirect 301 /dup_folder/ http://www.example.biz/It redirects to:http://www.example.biz/inspection11.htm?q=dup_folder/inspection11.htmBut I want it to redirect to:http://www.example.biz/inspection11.htmIs there something I can add to .htaccess to Rewrite the URL to how I want, or are the two above URLs seen as the exact same URL to a search engine?
301 Redirect are these URLs equivalent?
mod rewrite;301 redirect
Something else is at play here, that is causing http://www.example.biz/dup_folder/inspection11.htmto be converted to http://www.example.biz/inspection11.htm?q=dup_folder/inspection11.htmbecause out of the box, the use of Redirect 301 should not add that query string.So I'd look at the configuration of your site, the httpd.conf or the configuration of the relevant apache Vhost directive, or indeed existing .htaccess files, to see if you can stop whatever custom redirect process is adding the query string there. If you can't (find or change), then the following rewrite rule in a .htaccess file under /dup_folder/ (assuming you remove the existing Redirect 301 ) should remove the query string.RewriteEngine OnRewriteCond %{REQUEST_URI} ^/dup_folder/(.*)RewriteRule .* /inspection11.htm? [R=301,L]With the use of a trailing ? on the rewrite, it will clear off the query string that is being added by something else.