I requested kind of the complement of the question before:


Now I really desire a rewrite to occur noticeably, because I have switched URL schemes and although I would like that old links to operate, I would like the consumer to determine the brand new URL plan.

Which means this works

RewriteRule ^oldscheme/(.*)/?$  newscheme/$1

However the URL within the address bar remains as http://example.com/oldscheme/foo.

What's the proper way to perform a visible rewrite, ideally simply with mod_rewrite instead of something kludgy with Location redirects or somesuch?

When I cannot leave comments now, I'll publish my accessory for Ignacio's comment here.

You really should publish a 301 (Moved Permanently) redirect, as you are explaining there is a new site directory structure. So that your RewriteRule should read

RewriteRule ^oldscheme/(.*)/?$  newscheme/$1  [R=301]

It works out adding a "redirect" code does the secret:

RewriteRule ^oldscheme/(.*)/?$  newscheme/$1  [R]

Apparent looking back, but hopefully this will make the solution more searchable. I discovered it about this excellent "cheat sheet":


would this 301 redirect idea affect this?:

my htaccess file utilizes a single php template page to drag page content in to the browser, while using location within the address bar (so mysite.com/items/featured.php would obtain the "featured" content file within the "items" directory). I've it established to have an "index" content page too once the address finishes in /index.php or simply /.

however, whenever you don't specify /index.php the address bar shows the hidden query string during my htaccess file (example: mysite.com/?c=items&p=featured).

so could I keep my existing rule for that address that finishes in /index.php however alter the rule for that address ending in / to redirect to /index.php...then your query string problem above will not be viewed?

hope which makes sense.