Mobile app version of vmapp.org
Login or Join
Karen161

: Fastest Redirection on Apache Server with Wordpress for a Small ~200 Page Website If I have a website of about 200 pages and most of the links will be inevitably changing, what is the faster

@Karen161

Posted in: #Apache2 #Htaccess #HttpdConf #Redirects #Wordpress

If I have a website of about 200 pages and most of the links will be inevitably changing, what is the faster way to redirect them (fastest not in terms of how quickly I can do it, but in terms of the minimal load on the server)?

I have also made a differentiation between creating "RewriteRule"(s) that might redirect 20 links, versus using only the "Redirect" path commands.

Here are the different options that I see:


Within a Wordpress plugin
.htaccess RewriteRule when possible
.htaccess Redirect always
vhost .conf RewriteRule when possible
vhost .conf Redirect always


I assume it is option 4, but I haven't found a very definitive answer online.

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Karen161

1 Comments

Sorted by latest first Latest Oldest Best

 

@Eichhorn148

For 20 links, you are not going to notice a speed difference with any of those methods. None of them are going to add significant overhead.

There is significant overhead added by PHP and WordPress to run your site. The redirects are not going to impact performance at all.



For a very large quantity of redirects (thousands), individual rewrite rules are the worst option. Rewrite rules each have to be tested one at a time for each request. There is no way for the webserver to use a more efficient mechanism such as a lookup in a hash map.

Here is a question an ServerFault that addresses how to implement a very large number of redirects: Best way to handle thousands of permanent redirects It suggests using the RewriteMap functionality to do the lookup.

In the case of 20 redirects, scanning over them is going to be just as efficient as a hash lookup. Until you get to at least hundreds of redirects, it isn't something you need to worry about.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme