Modrewrite .. how to make it change in address bar

I have a page The following rule:

Options +FollowSymLinks
RewriteEngine On
RewriteRule ^([^-]*)\.html$ /view.php?m=$1 [L]

makes the url “widget.html”.

If I type in my browser the correct page loads, but if I type in, I am not redirected to widget.html. Would a search engine see view.php?m=widget as a different page than widget.html?


YOU must create the link in the format you want your visitors to see it then YOU must create the mod_rewrite (as you’ve done - nice job) to convert the “new format” back to the format that Apache can serve. Since view.php needs the value of m, I’m SURE that widget.html does not exist - nor does it need to!

It seems as if you have it backward - what mod_rewrite is supposed to do. After all, you don’t want a computer trying to guess what format you want links in and generate all sorts of nonsense, do you? IMHO, a read of the tutorial article linked in my signature might help - it has many others.