httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Mearns <mearn...@gmail.com>
Subject Re: [users@httpd] mod rewrite issue
Date Thu, 19 Mar 2009 12:50:13 GMT
> On Wed, Mar 18, 2009 at 9:05 PM, Johnny Edge <jedge@visafirst.com> wrote:
>>
>> Hello,
>>
>> I have a Virtual host that utilizes mod rewrite in the following manner
>>
>>
>> <VirtualHost 192.168.0.127:80>
>> ...
>>
>> RewriteEngine On
>> RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-f
>> RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-d
>> RewriteRule ^(.*) /notfound.php?%{QUERY_STRING}
>>
>> i.e. missing documents are passed to notfound.php
>>
>> I also have a directory inside the VH which I want to pass such requests to
>> a different script
>>
>>
>> <Directory "/var/www/html/info/admin/">
>>  AuthName "Restricted"
>>   NTLMAuth on
>>   NTLMAuthHelper "/usr/bin/ntlm_auth --helper-protocol=squid-2.5-ntlmssp"
>>   NTLMBasicAuthoritative on
>>   AuthType NTLM
>>   require valid-user
>>
>> RewriteEngine On
>> RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-f
>> RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-d
>> RewriteRule ^admin/(.*) /admin/index.php?%{QUERY_STRING} [L]
>>
>> </Directory>
>>
>> Still, http://info/admin/nonexistent will call notfound.php and not
>> admin/index.php


Out of curiosity, why not use a custom 404 page?

-- 
Feel free to contact me using PGP Encryption:
Key Id: 0x3AA70848
Available from: http://pgp.mit.edu/

---------------------------------------------------------------------
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