Hi
I'm just wondering how efficent mod_rewrite really is, and if there is a way to measure it's impact on the server?
The motivation behind this is to 'hide' the Perl script that drives the bookshop. There are multiple reasons for this, one of which is to make URLs much more user-friendly and indexible for search engines.
Here's what I have in my .htaccess file in the root directory:
# Rewrite rules for /bookshop.
#
RewriteEngine On
RewriteRule ^bookshop$ /bookshop/perl/bookshop.pl [L]
RewriteRule ^bookshop/$ /bookshop/perl/bookshop.pl [L]
RewriteRule ^bookshop/browse/([a-z]+)/$ /bookshop/perl/bookshop.pl?do=vc;c=$1;l=e [L]
RewriteRule ^bookshop/browse/([a-z]+)/([a-z]+)/$ /bookshop/perl/bookshop.pl?do=vc;c=$1;fi=$2;l=e [L]
RewriteRule ^bookshop/view/([a-z0-9A-Z]+)/$ /bookshop/perl/bookshop.pl?do=vb;isbn=$1;l=e [L]
RewriteRule ^bookshop/do/basket/$ /bookshop/perl/bookshop.pl?do=view_cart;l=e [L]
RewriteRule ^bookshop/do/order/$ /bookshop/perl/bookshop.pl?do=co;l=e [L]
RewriteRule ^bookshop/do/delete/([a-z0-9A-Z]+)/$ /bookshop/perl/bookshop.pl?do=rb;isbn=$1;l=e [L]
The server is an Athlon 1.6 with a gig of RAM, running Debian and under mod_perl. The site is expected to get around a thousand hits per day.
Is this mod_rewrite going to put considerably extra strain on the server? Do you think it will be a bottleneck? If so, how can I make it more efficent? Has anyone experienced similar performance gain or losses with the search engine templates that are provided on this forum software, maybe?
- wil
I'm just wondering how efficent mod_rewrite really is, and if there is a way to measure it's impact on the server?
The motivation behind this is to 'hide' the Perl script that drives the bookshop. There are multiple reasons for this, one of which is to make URLs much more user-friendly and indexible for search engines.
Here's what I have in my .htaccess file in the root directory:
Code:
memphis% cat .htaccess # Rewrite rules for /bookshop.
#
RewriteEngine On
RewriteRule ^bookshop$ /bookshop/perl/bookshop.pl [L]
RewriteRule ^bookshop/$ /bookshop/perl/bookshop.pl [L]
RewriteRule ^bookshop/browse/([a-z]+)/$ /bookshop/perl/bookshop.pl?do=vc;c=$1;l=e [L]
RewriteRule ^bookshop/browse/([a-z]+)/([a-z]+)/$ /bookshop/perl/bookshop.pl?do=vc;c=$1;fi=$2;l=e [L]
RewriteRule ^bookshop/view/([a-z0-9A-Z]+)/$ /bookshop/perl/bookshop.pl?do=vb;isbn=$1;l=e [L]
RewriteRule ^bookshop/do/basket/$ /bookshop/perl/bookshop.pl?do=view_cart;l=e [L]
RewriteRule ^bookshop/do/order/$ /bookshop/perl/bookshop.pl?do=co;l=e [L]
RewriteRule ^bookshop/do/delete/([a-z0-9A-Z]+)/$ /bookshop/perl/bookshop.pl?do=rb;isbn=$1;l=e [L]
The server is an Athlon 1.6 with a gig of RAM, running Debian and under mod_perl. The site is expected to get around a thousand hits per day.
Is this mod_rewrite going to put considerably extra strain on the server? Do you think it will be a bottleneck? If so, how can I make it more efficent? Has anyone experienced similar performance gain or losses with the search engine templates that are provided on this forum software, maybe?
- wil