Changing domains without redirecting will cause your site to lose traffic from previous visitors. ![]() Bookmarks to your site and links to your site located on other pages throughout the internet will break if your content disappears without any instructions to the browser about how to find its new location. If you have established a web presence and would like to change your domain to a new address, it is best not to just abandon your old domain. This is outside of the scope of this article, but you can get started with mod_rewrite in How To Set Up mod_rewrite for Apache. You can also create more flexible and powerful redirects with the mod_rewrite module. Permanent redirects Redirect permanent / In its simplest form, you can accomplish a temporary redirect with the following lines in your server configuration: This directive takes at least two arguments, the old URL and the new URL, and can be used to create both temporary and permanent redirects. In Apache, you can accomplish simple, single-page redirects using the Redirect directive, which is included in the mod_alias module that is enabled by default on a fresh Apache installation. You can do by following How To Set Up Apache Virtual Hosts on Ubuntu 16.04, on CentOS 7, or on Debian 7.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |