httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonathan Zuckerman <j.zucker...@gmail.com>
Subject Re: [users@httpd] can .htaccess make url better ?
Date Mon, 08 Mar 2010 18:56:59 GMT
On Mon, Mar 8, 2010 at 6:10 AM, Rich Bowen <rbowen@rcbowen.com> wrote:

>
> On Mar 8, 2010, at 4:15 AM, J. Bakshi wrote:
>
> Hello list,
>
> the click enlarge facility of an image gallery generates the links in a
> very ugly manner, like
>
> ````````````````
>
> http://192.168.1.1/reifenqualitaet/index.php?eID=tx_cms_showpic&file=uploads/tx_reifenqualitaetimage/image-227X227_02.jpg&bodyTag=
> <body>&wrap=%20|%20&md5=9021563e8e2c9efadb629ddd197f22bf
> ````````````````
>
> Is it somehow possible to generate the link little nicer by the help of
> .htaccess ?
>
>
> It is possible, using mod_rewrite, to make most URLs look different. One
> person's notion of nice may be different from another. I would, however,
> recommend that you ask this question of users of this particular image
> gallery software, as they very likely have a standard way of doing what
> you're trying to do.
>
> Failing that, I would suggest that you look at the mod_rewrite docs (
> http://httpd.apache.org/docs/trunk/rewrite/ and
> http://wiki.apache.org/httpd/Rewrite) and see if there's something there
> that does what you need.
>
> Also, note that .htaccess files are merely one of the places that you can
> put configuration directives. When possible, you should try to put
> directives in the server configuration file rather than in .htaccess files.
>
> --
> Rich Bowen
> rbowen@apache.org
>

Hey Rich, and anybody else who knows about this, what you've just said
touches on a question I've been wondering about: a few folks at work have
always told me that .htaccess was a really slow way to load configuration
because it needs to be checked per directory, as opposed to the global
configuration in httpd.conf or whatever that can be cached for the whole
webserver.

How true is this really? I've worked on a couple of high-load
high-availability webservers and we've never made a point of putting general
site configuration and rewrite rules in the httpd.conf file, using .htaccess
in the site root instead..
Having the ability to modify .htaccess without needing to restart the
web-servers is nice but certainly not essential, we generally restart the
webservers anyway when we make changes to the site in order to clear the
op-code cache.  I'm wondering though if we could retire a server and still
support the same load, or at least see performance increases with a little
jiggering of the configuration..
I guess the way to test this would be to just do it and see the results,
I'll let you know what I find out, but hearing about actual experiences from
anybody else would be nice too.

Mime
View raw message