apache rewrite_mode和页面刷新循环

时间:2019-08-05 09:06:23

标签: apache

有两个有角项目,即xee和xtest。 xtest使用的是https://stackoverflow.com/a/41151872/3259726定义的customLocationStrategy。我在Debian上使用apache2.4部署了这些项目。当我在浏览器中输入192.168.12.1/xtest地址时可以,但是如果刷新浏览器页面,它将启动无限循环重定向到/ xee。 这是我的Apache配置


WSGIDaemonProcess geonode python-path=/home/x/x:/home/x/.venvs/x/lib/python2.7/site-packages user=www-data threads=15 processes=2


    Header set Access-Control-Allow-Origin "*"
    ServerName http://localhost
    ServerAdmin webmaster@localhost
    DocumentRoot /home/x/x/x

    ErrorLog /var/log/apache2/error.log
    LogLevel warn
    CustomLog /var/log/apache2/access.log combined

    WSGIProcessGroup x
    WSGIPassAuthorization On
    WSGIScriptAlias / /home/x/x/x/wsgi.py


    
         
             Order deny,allow
             Allow from all
             Require all granted
         

        Order allow,deny
        Options Indexes FollowSymLinks
        Allow from all
        IndexOptions FancyIndexing
    

    
        Order allow,deny
        Options Indexes FollowSymLinks
        Allow from all
        Require all granted
        IndexOptions FancyIndexing
    

    
        Order allow,deny
        Allow from all
    


    ProxyPreserveHost On
    ProxyPass /xserver http://localhost:8080/xserver
    ProxyPassReverse /xserve http://localhost:8080/xserver
    ProxyPass /xee  http://localhost/static/demo.html
    ProxyPassReverse /xee http://localhost/static/
    ProxyPass /xtest http://localhost/static/xtest.html
    ProxyPassReverse /xtest http://localhost/static/

    RewriteEngine on
    RewriteCond %{REQUEST_URI} ^/xtest.*$
    RewriteRule ^/xtest6.*$ /xtest[R=301]
    RewriteCond %{REQUEST_URI} !xtest.*$
    RewriteCond %{REQUEST_URI} ^/$ 
    RewriteRule (.) /xee [R=301]
    #RewriteCond %{ENV:REDIRECT_STATUS} ^$
    #RewriteRule .* - [END]




0 个答案:

没有答案
相关问题