You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Ruediger Pluem <rp...@apache.org> on 2011/06/09 08:51:26 UTC

Re: svn commit: r1132802 - in /httpd/httpd/trunk/docs/manual: mod/mod_setenvif.xml rewrite/access.xml rewrite/intro.xml rewrite/rewritemap.xml ssl/ssl_faq.xml ssl/ssl_howto.xml vhosts/examples.xml


On 06/07/2011 12:09 AM, sf@apache.org wrote:
> Author: sf
> Date: Mon Jun  6 22:09:22 2011
> New Revision: 1132802
> 
> URL: http://svn.apache.org/viewvc?rev=1132802&view=rev
> Log:
> purge some useless uses of '.*'
> 
> Modified:
>     httpd/httpd/trunk/docs/manual/mod/mod_setenvif.xml
>     httpd/httpd/trunk/docs/manual/rewrite/access.xml
>     httpd/httpd/trunk/docs/manual/rewrite/intro.xml
>     httpd/httpd/trunk/docs/manual/rewrite/rewritemap.xml
>     httpd/httpd/trunk/docs/manual/ssl/ssl_faq.xml
>     httpd/httpd/trunk/docs/manual/ssl/ssl_howto.xml
>     httpd/httpd/trunk/docs/manual/vhosts/examples.xml
> 

> Modified: httpd/httpd/trunk/docs/manual/rewrite/intro.xml
> URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/rewrite/intro.xml?rev=1132802&r1=1132801&r2=1132802&view=diff
> ==============================================================================
> --- httpd/httpd/trunk/docs/manual/rewrite/intro.xml (original)
> +++ httpd/httpd/trunk/docs/manual/rewrite/intro.xml Mon Jun  6 22:09:22 2011
> @@ -186,7 +186,7 @@ the beginning of a query string).</p>
>  <dt>A full filesystem path to a resource</dt>
>  <dd>
>  <example>
> -RewriteRule ^/games.* /usr/local/games/web
> +RewriteRule ^/games /usr/local/games/web
>  </example>
>  <p>This maps a request to an arbitrary location on your filesystem, much
>  like the <directive module="mod_alias">Alias</directive> directive.</p>
> @@ -282,7 +282,7 @@ the word "go", you could use:</p>
>  <example>
>  RewriteCond %{QUERY_STRING} hack<br />
>  RewriteCond %{HTTP_COOKIE} !go<br />
> -RewriteRule .* - [F]
> +RewriteRule . - [F]

Can we have empty URLs? If yes the above change changes the result of rule for those.

>  </example>
>  <p>Notice that the exclamation mark specifies a negative match, so the rule is only applied if the cookie does not contain "go".</p>
>  
> 

> Modified: httpd/httpd/trunk/docs/manual/ssl/ssl_howto.xml
> URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/ssl/ssl_howto.xml?rev=1132802&r1=1132801&r2=1132802&view=diff
> ==============================================================================
> --- httpd/httpd/trunk/docs/manual/ssl/ssl_howto.xml (original)
> +++ httpd/httpd/trunk/docs/manual/ssl/ssl_howto.xml Mon Jun  6 22:09:22 2011
> @@ -260,7 +260,7 @@ SSLRequire           %{SSL_CIPHER_USEKEY
>  RewriteEngine        on
>  RewriteCond          %{REMOTE_ADDR} !^192\.168\.1\.[0-9]+$
>  RewriteCond          %{HTTPS} !=on
> -RewriteRule          .* - [F]
> +RewriteRule          . - [F]

Can we have empty URLs? If yes the above change changes the result of rule for those.

>  
>  #   Allow Network Access and/or Basic Auth
>  Satisfy              any
> 
> Modified: httpd/httpd/trunk/docs/manual/vhosts/examples.xml
> URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/vhosts/examples.xml?rev=1132802&r1=1132801&r2=1132802&view=diff
> ==============================================================================
> --- httpd/httpd/trunk/docs/manual/vhosts/examples.xml (original)
> +++ httpd/httpd/trunk/docs/manual/vhosts/examples.xml Mon Jun  6 22:09:22 2011
> @@ -562,7 +562,7 @@
>          # primary vhost<br />
>          DocumentRoot /www/subdomain<br />
>          RewriteEngine On<br />
> -        RewriteRule ^/.* /www/subdomain/index.html<br />
> +        RewriteRule . /www/subdomain/index.html<br />

Can we have URLs not starting with /? If yes the above change changes the result of rule for those.


Regards

RĂ¼diger

Re: svn commit: r1132802 - in /httpd/httpd/trunk/docs/manual: mod/mod_setenvif.xml rewrite/access.xml rewrite/intro.xml rewrite/rewritemap.xml ssl/ssl_faq.xml ssl/ssl_howto.xml vhosts/examples.xml

Posted by Stefan Fritsch <sf...@sfritsch.de>.
On Thursday 09 June 2011, Ruediger Pluem wrote:
> On 06/07/2011 12:09 AM, sf@apache.org wrote:
> > Author: sf
> > Date: Mon Jun  6 22:09:22 2011
> > New Revision: 1132802
> > 
> > URL: http://svn.apache.org/viewvc?rev=1132802&view=rev
> > Log:
> > purge some useless uses of '.*'
> > 
> > Modified:
> >     httpd/httpd/trunk/docs/manual/mod/mod_setenvif.xml
> >     httpd/httpd/trunk/docs/manual/rewrite/access.xml
> >     httpd/httpd/trunk/docs/manual/rewrite/intro.xml
> >     httpd/httpd/trunk/docs/manual/rewrite/rewritemap.xml
> >     httpd/httpd/trunk/docs/manual/ssl/ssl_faq.xml
> >     httpd/httpd/trunk/docs/manual/ssl/ssl_howto.xml
> >     httpd/httpd/trunk/docs/manual/vhosts/examples.xml


> > -RewriteRule .* - [F]
> > +RewriteRule . - [F]
> 
> Can we have empty URLs? If yes the above change changes the result
> of rule for those.

No, I don't think so. But I could change the regexp to ^ if you want.

> >  #   Allow Network Access and/or Basic Auth
> >  Satisfy              any
> > 
> > Modified: httpd/httpd/trunk/docs/manual/vhosts/examples.xml
> > URL:
> > http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/vhost
> > s/examples.xml?rev=1132802&r1=1132801&r2=1132802&view=diff
> > ================================================================
> > ============== ---
> > httpd/httpd/trunk/docs/manual/vhosts/examples.xml (original) +++
> > httpd/httpd/trunk/docs/manual/vhosts/examples.xml Mon Jun  6
> > 22:09:22 2011 @@ -562,7 +562,7 @@
> > 
> >          # primary vhost<br />
> >          DocumentRoot /www/subdomain<br />
> >          RewriteEngine On<br />
> > 
> > -        RewriteRule ^/.* /www/subdomain/index.html<br />
> > +        RewriteRule . /www/subdomain/index.html<br />
> 
> Can we have URLs not starting with /? If yes the above change
> changes the result of rule for those.

Not in server-context (which this example is about). But since I think 
we can have URLs not starting with / in directory context, maybe I 
should change that back to "^/".