lucy24 - 8:15 pm on Apr 7, 2013 (gmt 0)
I am going to move the file physically yes, I thought that automatic changed the url name...
Yes and no. By default, an URL is a file's physical location within your domain, so
means: "filename.html" lives inside "subdir" which lives inside "dir" which is a top-level directory within your domain's main directory (parallel to the top-level index.html file).
But thanks to rewriting, it doesn't have to be that way.
Since you're talking about files that already exist-- and I have to assume they're already getting traffic-- you will probably want to rewrite them. Unless you really didn't like the old location and you want the URL to look different.
Conversely: If you are only doing this because you don't like the URLs and want to make different ones, you don't have to physically move the files. You can just rewrite them.
I suppose the rule should come after all rewrite rules I have for both http and https.
The exact position of the rule will depend on whether you decide to rewrite or redirect.
If you redirect, the rule should come before your general redirects (index.html and with/without www.) but after any RewriteRules ending in [F] or [G]. If you rewrite, it depends on what your existing rules are.
#1 You need to make sure the different rules don't conflict with each other
#2 Arrange the rules so there is no more than one redirect.
#3 All rewrites go after all redirects. (There are rare exceptions but they probably won't apply here.)
If you use relative links, remember that they are based on where the browser "thinks" it is, whether or not that's where it "really" is.