我正在尝试将访问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) 我正在尝试使用 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) apache ×1
apache2 ×1
artifactory ×1
build.gradle ×1
gradle ×1
mod-proxy ×1
mod-rewrite ×1
smartling ×1