Conditional .htaccess
am 20.10.2009 00:17:00 von Scott Haneda
Is it possible to have .htacess values be conditional in any way. For
example:
if (my ip address is accessing the site)
some apache directive here
end if
--
Scott * If you contact me off list replace talklists@ with scott@ *
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See 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
Re: Conditional .htaccess
am 20.10.2009 01:21:10 von Jonathan Zuckerman
On Mon, Oct 19, 2009 at 3:17 PM, Scott Haneda wrote:
> Is it possible to have .htacess values be conditional in any way. Â F=
or
> example:
>
> if (my ip address is accessing the site)
> Â Â Â Â some apache directive here
> end if
>
> --
> Scott * If you contact me off list replace talklists@ with scott@ *
>
>
> ------------------------------------------------------------ ---------
> The official User-To-User support forum of the Apache HTTP Server Project=
..
> See 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
>
>
".htaccess values" could be more specific...
..htaccess is a file which allows you to do many types of apache
configuration dynamically in a directory without having to restart the
webserver. If you're talking about URL rewriting, here's somewhere to
start (replace the 2.2 with whatever major.minor version of apache
you're using):
http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html#rewrit econd
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See 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
Re: Conditional .htaccess
am 20.10.2009 01:23:41 von Scott Haneda
On Oct 19, 2009, at 4:21 PM, Jonathan Zuckerman wrote:
> On Mon, Oct 19, 2009 at 3:17 PM, Scott Haneda
> wrote:
>> Is it possible to have .htacess values be conditional in any way.
>> For
>> example:
>>
>> if (my ip address is accessing the site)
>> some apache directive here
>> end if
>>
> ".htaccess values" could be more specific...
> .htaccess is a file which allows you to do many types of apache
> configuration dynamically in a directory without having to restart the
> webserver. If you're talking about URL rewriting, here's somewhere to
> start (replace the 2.2 with whatever major.minor version of apache
> you're using):
> http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html#rewrit econd
Sorry, I should have been more specific
php admin value and php flag values, I would like to only be enabled
for my IP address, but publicly, I want them off, so the public does
not see errors, only I do.
--
Scott * If you contact me off list replace talklists@ with scott@ *
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See 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
Re: Conditional .htaccess
am 20.10.2009 01:39:14 von LuKreme
On 19-Oct-2009, at 17:23, Scott Haneda wrote:
> php admin value and php flag values, I would like to only be enabled
> for my IP address, but publicly, I want them off, so the public does
> not see errors, only I do.
I think the way to do this is to setup a different location.
Something like this (this is for webdav, but the idea is the same):
ServerName www.example.com
ServerAlias example.com
DocumentRoot /usr/home/ksmith/http/
CustomLog /home/ksmith/logs/site.log combined
ErrorLog /home/ksmith/logs/site_error.log
ServerName webdav.example.com
DocumentRoot /usr/home/ksmith/http/
DavLockDB /tmp/DavLock.example
CustomLog /home/ksmith/logs/sitedav.log combined
ErrorLog /home/ksmith/logs/site_daverror.log
DAV On
AuthType Basic
AuthName "Example.com DAV"
AuthUserFile /home/ksmith/.htdavpass
#AllowOverride All
ForceType text/plain
require valid-user
notice the two virtualhosts are pointing at the same content.
You would do something similar to create a, say, phpadmin.example.com
that turned on the directives you wanted:
ServerName phpa.example.com
DocumentRoot /usr/home/ksmith/http/
php_flag display_errors on
--
I WILL NOT STRUT AROUND LIKE I OWN THE PLACE
Bart chalkboard Ep. 2F15
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See 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
Re: Re: Conditional .htaccess
am 20.10.2009 04:34:54 von Scott Haneda
Ah ha, very nice idea. As long as my sites are not relying on the
hostname, which I rarely every use src=http://example.com/file.foo and
use src=/file.foo, then I should be ok.
Thanks, I never thought about approaching it that way, good idea.
--
Scott * If you contact me off list replace talklists@ with scott@ *
On Oct 19, 2009, at 4:39 PM, LuKreme wrote:
> On 19-Oct-2009, at 17:23, Scott Haneda wrote:
>> php admin value and php flag values, I would like to only be
>> enabled for my IP address, but publicly, I want them off, so the
>> public does not see errors, only I do.
>
> I think the way to do this is to setup a different location.
>
> Something like this (this is for webdav, but the idea is the same):
>
>
> ServerName www.example.com
> ServerAlias example.com
> DocumentRoot /usr/home/ksmith/http/
> CustomLog /home/ksmith/logs/site.log combined
> ErrorLog /home/ksmith/logs/site_error.log
>
>
>
>
> ServerName webdav.example.com
> DocumentRoot /usr/home/ksmith/http/
> DavLockDB /tmp/DavLock.example
> CustomLog /home/ksmith/logs/sitedav.log combined
> ErrorLog /home/ksmith/logs/site_daverror.log
>
> DAV On
> AuthType Basic
> AuthName "Example.com DAV"
> AuthUserFile /home/ksmith/.htdavpass
> #AllowOverride All
> ForceType text/plain
> require valid-user
>
>
>
> notice the two virtualhosts are pointing at the same content.
>
> You would do something similar to create a, say,
> phpadmin.example.com that turned on the directives you wanted:
>
>
> ServerName phpa.example.com
> DocumentRoot /usr/home/ksmith/http/
> php_flag display_errors on
>
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See 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