Forum Moderators: phranque
RewriteRule ^client-requested-url-path$ /path-to-script?query-string [L]
[edited by: jdMorgan at 2:18 am (utc) on Apr 4, 2010]
[edit reason] example.com [/edit]
http://www.mydomain.com/index.php [R=301,L] http://www.mydomain.com/index.php [R=301,L] http://www.myotherdomain.com/index.php [R=301,L] http://www.mydomain.com/index.php?show=blog [R=301,L] www.example.com/ you would want the visitor to make a new request for a different and longer URL. www.example.com/ I'd use a rewrite to fetch the content for the currently requested URL, the rewrite silently fetching content from a different server-internal filepath other than that suggested by the path part of the URL request. DirectoryIndex /index.php?show=blog would have been a far better solution, but using an internal rewrite could also work well. (www.)example.com/index.php and/or (www.)example.com/index.php?show=blog directly returning content with "200 OK" status. You would need to solve that Duplicate Content scenario by redirecting those requests to www.example.com/ too. (www.)example.com/index.html or (www.)example.com/index.htm or (www.)example.com/index.php or URL (www.)example.com/index.php?show=blog they should be 301 redirected to the new URL www.example.com/. This bit is the redirect. www.example.com/ the content should be silently served from server internal filepath /index.php?show=blog without the URL bar in the browser being updated. This bit is the rewrite.