Apache mod_rewrite (.htaccess) - Rewrite or Redirect Request URLs if page not found, or no www
Apache mod_rewrite ( .htaccess ) - Request rewrites & redirects to site root if page or directory not found There are many scenarios where mod_rewrite can be used on a web server to improve usability, optimise for search engines, perform redirects based of specific criteria and much more. The following are some examples of how to configure .htaccess files on an Apache web server to alter requests and actions taken by the web server, including configuring the server to redirect to the site root (or other specified page) if a page or directory is not found, configuring the server to convert components of a http request into query string parameters to be passed to a specific page/script for processing and display (without altering the original address entered into the browser).