httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Israel Brewster <isr...@frontierflying.com>
Subject Re: [users@httpd] mod_rewrite problem
Date Thu, 08 Mar 2007 00:05:39 GMT
On Mar 7, 2007, at 1:16 PM, Vincent Bray wrote:
> Like, posting the rest of your rules, perhaps? As you're rewriting to
> a php script, are you able to edit it to show a dump of the
> environment? phpinfo(); die(); does that job.
> Also, are there any Alias directives for nagios? Seeing your config in
> more detail would help.
> --  
> noodl

Oh, sure. Sorry- not trying to make things difficult here, it's just  
that I spent several hours yesterday working on the issue, so I'm a  
bit frustrated, and quite possibly not thinking straight any more :P.  
Anyway, the rewrite rules I'm currently working with are as follows:

RewriteLog "/var/log/httpd/rewrite.log"
RewriteLogLevel 2
RewriteRule ^/nagios[/A-Za-z0-9]* /categories/8-Nagios [NC,QSA,L,R]
RewriteRule ^(/archives/([0-9]+)-[0-9a-z\.\_!;,\+\-\%]+\.html) / 
index.php?/$1 [NC,L,QSA]
RewriteRule ^(/authors/([0-9]+)-[0-9a-z\.\_!;,\+\-\%]+) /index.php?/ 
$1 [NC,L,QSA]
RewriteRule ^(/feeds/categories/([0-9;]+)-[0-9a-z\.\_!;,\+\-\%]+ 
\.rss) /index.php?/$1 [NC,L,QSA]
RewriteRule ^(/feeds/authors/([0-9]+)-[0-9a-z\.\_!;,\+\-\%]+\.rss) / 
index.php?/$1 [NC,L,QSA]
RewriteRule ^(/categories/([0-9;]+)-[0-9a-z\.\_!;,\+\-\%]+) / 
index.php?/$1 [NC,L,QSA]
RewriteRule ^/archives([/A-Za-z0-9]+)\.html /index.php?url=/archives/ 
$1.html [NC,L,QSA]
RewriteRule ^(/[0-9]+)[_\-][0-9a-z_\-]*\.html /index.php?url=$1- 
article.html [L,NC,QSA]
RewriteRule ^/feeds/(.*) /index.php?url=/feeds/$1 [L,QSA]
RewriteRule ^/unsubscribe/(.*)/([0-9]+) /index.php?url=/unsubscribe/ 
$1/$2 [L,QSA]
RewriteRule ^/approve/(.*)/(.*)/([0-9]+) /index.php?url=approve/$1/$2/ 
$3 [L,QSA]
RewriteRule ^/delete/(.*)/(.*)/([0-9]+) /index.php?url=delete/$1/$2/ 
$3 [L,QSA]
RewriteRule ^(/admin|entries)(/.+)? /index.php?url=admin/ [L,QSA]
RewriteRule ^/archive/? /index.php?url=/archive [L,QSA]
RewriteRule ^(/index|atom[0-9]*|rss|b2rss|b2rdf).(rss|rdf|rss2|xml) / 
rss.php?file=$1&ext=$2
RewriteRule ^(/plugin|plugin)/(.*) /index.php?url=$1/$2 [L,QSA]
RewriteRule ^/search/(.*) /index.php?url=/search/$1 [L,QSA]
RewriteRule ^/comments/(.*) /index.php?url=/comments/$1 [L,QSA]
RewriteRule ^(serendipity\.css|serendipity_admin\.css) index.php?url=/ 
$1 [L,QSA]
RewriteRule ^index\.(html?|php.+) index.php?url=index.html [L,QSA]
RewriteRule ^htmlarea/(.*) htmlarea/$1 [L,QSA]


Aside from the nagios one that I added, this is the standard set of  
rules for a serendipity (www.s9y.org) install. I have tried  
commenting out all of them (completely breaking my site, of course)  
except for the nagios one, but I still wind up at the index page when  
I try accessing /nagios. The Directory block for the root directory  
(which this is all running out of) is the following:

<Directory "/WebServer/Documents">
     Options -Indexes FollowSymLinks MultiViews
     AllowOverride All
     Order allow,deny
     Allow from all
     RewriteEngine On
</Directory>

the rest of my httpd.conf is default, the only other parts I have  
edited being the server name and UseCanonicalName directives.

I could potentially edit the php file, but I really don't know php-  
my programing skills are primarily limited to shell scripting and C+ 
+ :) Where would I stick that code, or would that depend on the  
script (as I suspect would be the case)? It is the serendipity  
index.php file if you want to download it and take a look. Thank you  
VERY much for your help. I greatly appreciate it :)

> -----------------------------------------------
> Israel Brewster
> Computer Support Technician
> Frontier Flying Service Inc.
> 5245 Airport Industrial Rd
> Fairbanks, AK 99709
> (907) 450-7250 x293
> -----------------------------------------------
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server  
> Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message