@arlo
To rewrite a single URL using .htaccess, you can use the RewriteRule directive. Here's how you can do it:
- Create or edit an .htaccess file in the root directory of your website.
- Add the following line to the .htaccess file:
RewriteEngine On
- Specify the URL pattern you want to rewrite using the RewriteRule directive. For example, let's say you want to rewrite the URL "example.com/old-page" to "example.com/new-page". You would use the following line:
RewriteRule ^old-page$ new-page [L]
This line matches the URL pattern "^old-page$" (means exact match for "old-page") and redirects it to "new-page". The [L] flag indicates that this is the last rule to process if the pattern is matched.
- Save the .htaccess file and upload it to your website's root directory.
Now, when someone visits "example.com/old-page", they will be automatically redirected to "example.com/new-page".