路由和URL(控制器/函数)在docker上运行的codeigniter中不工作

5q4ezhmt  于 11个月前  发布在  Docker
关注(0)|答案(1)|浏览(128)

我试图设置url localhost:8080/main/testfunction,但它说The requested URL was not found on this server.
localhost:8080正在工作,它重定向到main/index
我的.htaccess是

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /booking/
    RewriteCond %{REQUEST_URI} ^system.*
    RewriteRule ^(.*)$ /index.php?/$1 [L]
    RewriteCond %{REQUEST_URI} ^application.*
    RewriteRule ^(.*)$ /index.php?/$1 [L]

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>

有什么问题吗?

bn31dyow

bn31dyow1#

通过在Dockerfile中添加此内容修复了此问题

RUN a2enmod rewrite

相关问题