> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.accessorange.com/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# Redirecting a URL

Articles on: [Networking](/en/category/networking-7qggvd/)

## Redirecting a URL

  
  
Using Redirect in an .htaccess file enables you to redirect users from an old page to a new page without having to keep the old page. For example, if you use index.html as your index file and then later rename index.html to home.html, you could set up a redirect to send users from index.html to home.html. For example:  
  
Redirect /path/to/old/file/old.html [http://www.example.com/new/file/new.html](http://www.example.com/new/file/new.html)  
  
The first path to the old file must be a local UNIX path, NOT the full path. So, if the .htaccess file is in the directory /example.com, you would not include /home/exampleuser/example.com in the local UNIX path. The first / represents the example.com directory. If the old file was in that directory, you would follow the / with the old file name.  
  
The second path to the new file can be a local UNIX path, but can also be a full URL to link to a page on a different server or the same server.  
  

## Forcing www in the URL

  
  
RewriteEngine On  
  
RewriteCond %{HTTP_HOST} ^example.com  
  
RewriteRule (.*) [http://www.example.com/$1](http://www.example.com/$1) [R=301,L]

Updated on: 31/01/2023