I’m permanently forwarding a directory to its own domain, i had a wordpress setup in the directory at one time which google indexed… I’ve setup the redirect in my .htaccess however permalink structure is appended to the forwarded domain. So im taking everything from /sample forwarding to http://www.sample.com but im wanting to strip the unused variables from the url such as http://www.sample.com/?p=6, etc… However i need this done only for files in the /sample directory as i still have wordpress installs that need to remain intact. Also how can i not have a double forward slash after the redirect. I have:
Redirect permanent /sample http://www.sample.com
But it outputs http://www.sample.com//
Try this instead:
The
?should strip query string (?p=6etc)The same but using mod_rewrite: