This is a discussion on [newbie] Making sense of a .htaccess within the Apache Web Server forums, part of the Web Server and Related Forums category; Hello When working on my laptop, I'd like to use a lighter alternative to Apache that is Abyss X1 ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hello
When working on my laptop, I'd like to use a lighter alternative to Apache that is Abyss X1 to write web apps using the Code Igniter PHP framework. Problem is, to present clean URLs, Code Igniter uses mod_rewrite and .htaccess... which Abyss doesn't support. I googled for information on mod_rewrite, but I'm stuck with the second condition below :-/ So I need to understand what the .htaccess sample given in the Code Igniter documentation means before trying to rewrite it to work with Abyss' URL Rewriting module. Here's the .htaccess that works when I upload the app on a shared host that runs Apache: ---------- RewriteEngine on RewriteRule ^$ index.php [L] RewriteCond $1 !^(index\.php|assets|search) RewriteRule ^(.*)$ index.php/$1 [L] ---------- 1. Does the first line mean that if the URL is empty for that part of the URL (eg. http://localhost/igniter/), it should append index.php (to turn into http://localhost/igniter/index.php)? 2. In the RewriteCond line, what does $1 stand for? I haven't found information on this type of variable. Is it somehow related to a $1 reference in regexes? Thanks! |
|
|||
|
On Thu, 25 Jan 2007 08:58:47 +0100, Davide Bianchi
<davideyeahsure@onlyforfun.net> wrote: >> 2. In the RewriteCond line, what does $1 stand for? > >The bits in the parenthesis in the url, so basically the whole URL. OK. So Apache first saves the stuff between brackets into $1, and then performs the test. Thanks! |