首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >Apache2.4 ProxyPassMatch重定向301问题

Apache2.4 ProxyPassMatch重定向301问题
EN

Stack Overflow用户
提问于 2018-06-02 19:52:00
回答 1查看 188关注 0票数 0

虚拟主机或.htaccess中的重定向301对php文件不起作用。

我的环境: apache 2.4 php-fpm 7.0

我的vhost配置:

代码语言:javascript
复制
<VirtualHost *:80>
    ServerAdmin xxx@example.com
    DocumentRoot /pathto/www/
    DirectoryIndex index.htm index.php index.html
    ServerName www.example.com

    <Directory "/pathto/www/">
        RewriteEngine on
        Redirect 301 /myfile.php "http://www.example.com/page"
        Redirect 301 /contact "http://www.example.com/contacts.htm"

        Include /pathto/www/.htaccess
    </Directory>

    ProxyPassMatch ^/(.*\.php(/.*)?)$ unix:/run/php/php7.0-fpm.sock|fcgi://localhost/pathto/www/
</VirtualHost>

重定向301 /file.php也在.htaccess中,但没有人在工作。所有其他基于uri或别名的重定向规则都可以正常工作!?

帮助欣赏。

EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/50656629

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档