[ 
https://issues.apache.org/jira/browse/SOLR-7240?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14379496#comment-14379496
 ] 

ASF GitHub Bot commented on SOLR-7240:
--------------------------------------

GitHub user makuk66 opened a pull request:

    https://github.com/apache/lucene-solr/pull/136

    SOLR-7240 add redirect of / to /solr/

    SOLR-7240 add redirect of / to /solr/, using the jetty rewrite module with 
a regex pattern
    
    With this patch, / (and only /) redirects to /solr/.
    
    Tested with `bin/solr -f` on OSX:
    
    ```
    $ printf "GET / HTTP/1.0\r\n\r\n" | nc localhost 8983
    HTTP/1.1 302 Found
    Location: http://127.0.0.1:8983/solr/
    Content-Length: 0
    
    $ printf "GET /solr/ HTTP/1.0\r\n\r\n" | nc localhost 8983 | grep '<title>'
      <title>Solr Admin</title>
    $ printf "GET /foo HTTP/1.0\r\n\r\n" | nc localhost 8983 | grep '<title>'
    <title>Error 404 Not Found</title>
    ```

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/makuk66/lucene-solr 
SOLR-7240-redirect-slash-to-solr-squashed

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/lucene-solr/pull/136.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #136
    
----
commit 7bab2d8ab38a8e27fe606e63eb7ae6f48181a492
Author: Martijn Koster <[email protected]>
Date:   2015-03-25T08:18:28Z

    SOLR-7240 add redirect of / to /solr/, using the jetty rewrite module with 
a regex pattern

----


> redirect / to /solr 
> --------------------
>
>                 Key: SOLR-7240
>                 URL: https://issues.apache.org/jira/browse/SOLR-7240
>             Project: Solr
>          Issue Type: Improvement
>            Reporter: Hoss Man
>         Attachments: SOLR-7240.patch
>
>
> Prior to Solr 5, we avoided doing anything fancy with our jetty configs 
> because we didn't want to overly customize "the example" beyond things that 
> involved loading the solr.war.
> That's not longer an issue, so we might as well plop in some jetty config 
> features to redirect / to /solr.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to