如何从Apache重定向自动发现?
我正在尝试将Outlook的Autodiscover.xml重定向到web服务器之外,因为我们不在本地托管Exchange,而是使用office365 经过大量阅读,我相信我已经接近了,尽管昨天测试时,重定向似乎不起作用 问题: 我想知道我使用的配置是否有问题?我是否缺少使其正常工作的配置如何从Apache重定向自动发现?,apache,redirect,outlook,office365,Apache,Redirect,Outlook,Office365,我正在尝试将Outlook的Autodiscover.xml重定向到web服务器之外,因为我们不在本地托管Exchange,而是使用office365 经过大量阅读,我相信我已经接近了,尽管昨天测试时,重定向似乎不起作用 问题: 我想知道我使用的配置是否有问题?我是否缺少使其正常工作的配置 /var/www/html/public/ SetEnv HTTPS on <IfModule mod_rewrite.c> RewriteEngine On Options -Inde
/var/www/html/public/
SetEnv HTTPS on
<IfModule mod_rewrite.c>
RewriteEngine On
Options -Indexes
# Send would-be 404 requests to Craft
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/(favicon\.ico|apple-touch-icon.*\.png)$ [NC]
RewriteRule (.+) index.php?p=$1 [QSA,L]
Options - Autodiscover
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ autodiscover.php [NC,L]
</IfModule>
正如我上面所说的,我想知道我的配置是否有问题,这样才能正常工作?感谢您在这方面给予的一切帮助 如果这不符合任何格式规则,或内容不清楚,请让我知道,我会尽我所能纠正他们或使事情更清楚。再次感谢!
<?php
preg_match("/\<EMailAddress\>(.*?)\<\/EMailAddress\>/", $data, $matches);
//set Content-Type
header("Content-Type: application/xml");
?>
<?php echo '<?xml version="1.0" encoding="utf-8" ?>'; ?>
<Autodiscover xmlns="http://schemas.microsoft.com/exchange/autodiscover/responseschema/2006">
<Response xmlns="http://schemas.microsoft.com/exchange/autodiscover/outlook/responseschema/2006a">
<Account>
<AccountType>email</AccountType>
<Action>settings</Action>
<Protocol>
<Type>POP3</Type>
<Server>mail.plym.com</Server>
<Port>995</Port>
<LoginName><?php echo $matches[1]; ?></LoginName>
<DomainRequired>off</DomainRequired>
<SPA>off</SPA>
<SSL>on</SSL>
<AuthRequired>on</AuthRequired>
<DomainRequired>off</DomainRequired>
</Protocol>
<Protocol>
<Type>IMAP</Type>
<Server>mail.plym.com</Server>
<Port>993</Port>
<DomainRequired>off</DomainRequired>
<LoginName><?php echo $matches[1]; ?></LoginName>
<SPA>off</SPA>
<SSL>on</SSL>
<AuthRequired>on</AuthRequired>
</Protocol>
<Protocol>
<Type>SMTP</Type>
<Server>mail.plym.com</Server>
<Port>465</Port>
<DomainRequired>off</DomainRequired>
<LoginName><?php echo $matches[1]; ?></LoginName>
<SPA>off</SPA>
<SSL>on</SSL>
<AuthRequired>on</AuthRequired>
<UsePOPAuth>on</UsePOPAuth>
<SMTPLast>off</SMTPLast>
</Protocol>
</Account>
</Response>
</Autodiscover>