小编das*_*vvv的帖子

apache2 mod_rewrite基于语言然后代理

我正在尝试将访问www.server.com的用户重定向到浏览器的首选语言设置.

当用户在www.server.com/<lang>下面的情况下输入/ es为西班牙语时,它们被正确地代理到智能翻译服务器.但是,当用户在其浏览器中设置了语言首选项时,他们会遇到重定向循环.

我有以下配置:

<VirtualHost *:8008>
        ServerName www.server.com
        ServerAlias www

        ProxyPreserveHost On

        RewriteEngine On

        RewriteCond %{HTTP:Accept-Language} ^es [NC]
        RewriteRule ^/$ es/ [R=301,L]

      <Proxy http://server.sl.smartling.com/*>
          Allow from all
      </Proxy>

      <LocationMatch "/es">
          ProxyPass http://server.sl.smartling.com/es
          ProxyPassReverse http://server.sl.smartling.com/es
          Header add Host "www.server.com"
          RequestHeader set Host "www.server.com"
      </LocationMatch>

  DocumentRoot /www
  <Directory /> 
                Options FollowSymLinks
                AllowOverride None
        </Directory>
        <Directory /www/>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride all
                Order allow,deny
                allow from all
        </Directory>

        ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
        <Directory "/usr/lib/cgi-bin">
                AllowOverride None
                Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
                Order …
Run Code Online (Sandbox Code Playgroud)

apache mod-rewrite apache2 mod-proxy smartling

5
推荐指数
1
解决办法
182
查看次数

Gradle 发布到artifactory - 找不到方法artifactoryPublish()

我正在尝试使用 gradle 将工件发布到artifactory,但是gradle 无法识别artifactoryPublish() 或artifactory()。我收到以下错误:

Could not find method artifactoryPublish() for arguments [build_9ujhxzionc580et0ezlx54vcs$_run_closure4@14af6c29] on root project 'uw-data-util' of type org.gradle.api.Project. 
Run Code Online (Sandbox Code Playgroud)

我的gradle版本3.5

这是我的build.gradle

apply plugin: "groovy"
apply plugin: "java"
apply plugin: "maven"
apply plugin: "eclipse"
apply plugin: "idea"
apply plugin: 'application'
apply plugin: 'maven-publish'

repositories {
    mavenCentral()
    mavenLocal()
    jcenter()
    maven { url "https://artifactory.internal.com/artifactory/libs-release/"
        credentials { username = project.hasProperty('artifactory_user') ? project.artifactory_user : System.getenv()['ARTIFACTORY_USER']
            password = project.hasProperty('artifactory_password') ? project.artifactory_password : System.getenv()['ARTIFACTORY_KEY']}
    }
}

// In this section you declare the dependencies …
Run Code Online (Sandbox Code Playgroud)

artifactory gradle build.gradle

3
推荐指数
1
解决办法
2万
查看次数