Updated on Mar 13, 2019
Method Type: User
(This means that the method is handled by the webmaster by enabling mod_rewrite in the .htaccess file)
The Apache module mod_rewrite is supported on all FastComet Hosting Plans
Status: Must be applied/enabled by the user.
A landing page can be any page that a user accesses after clicking on a link provided by a search engine. If a user tries to access a page which has a redirect, the user will have to load another page, which will delay the response and detriment the user experience.
How landing page redirecting works:
Redirects add time to the loading of a page as they make additional Round-trip times (RTTs) from the web browser to the web server. Redirects should be used only when they are the only option left from a technical standpoint. You should also avoid multiple redirects to get to a page. It is preferred that you do not issue client-side redirects like using the http-equiv= attribute in a Meta tag. If you absolutely have to redirect, it is still much better to use HTTP via Apache module mod_rewrite (server-side) than JS or Meta tag redirects (client-side).
Avoiding landing page redirects provides the following Advantages:
Using server-side instead of client-side page redirects is essential for the user experience on your website, especially if you need to have more than a few redirects. Here you will see some examples of server-side redirect using mod_rewrite in the .htaccess file.
If you have a page that you want to redirect, let us say “software.html” on your new domain, you can do so with the following code block added to the .htaccess file:
<IfModule mod_rewrite.c> RewriteEngine On RewriteRule ^ software.html$ http://newdomain.example.org/software.html </IfModule>
If you have renamed a page (test1 to test2) and you want to fix the direct of the page while still keeping the old URL of the page, you can do so by adding:
<IfModule mod_rewrite.c> RewriteEngine on RewriteRule "^/test1\.html$" "/test2.html" [PT] </IfModule>
This is using the Redirect directive instead of the mod_rewrite module, but it is an easy way to accomplish the desired result.