简体   繁体   English

WHM 启用 mod_rewrite

[英]WHM Enabling mod_rewrite

I have a CentOS 6.8 w/ WHM on GoDaddy and I have a laravel application.我在 GoDaddy 上有一个带有 WHM 的 CentOS 6.8,我有一个 Laravel 应用程序。 The routes don't work, they return a 404 Not found and because of this I'm assuming it's a problem with mod_rewrite.路由不起作用,它们返回 404 Not found,因此我假设这是 mod_rewrite 的问题。

I cannot seem to find any mod_rewrite anywhere in phpinfo() though I've read it won't appear there because of how cPanel/WHM works.我似乎无法在 phpinfo() 的任何地方找到任何 mod_rewrite,尽管我读过它不会出现在那里,因为 cPanel/WHM 是如何工作的。 I've tried other commands to show me what the value of mod_rewrite is and I can't seem to find it anywhere.我尝试了其他命令来告诉我 mod_rewrite 的值是什么,但我似乎在任何地方都找不到它。

I've also tried adding "RewriteEngine On" in "Home > Service Configuration ?> Apache Configuration > Include Editor".我还尝试在“主页>服务配置?>Apache配置>包含编辑器”中添加“RewriteEngine On”。 I've googled a lot of pages but I still can't figure out how to do this.我用谷歌搜索了很多页面,但我仍然不知道如何做到这一点。

Please help.请帮忙。 Thank you in advance.先感谢您。

mod_rewrite comes enabled by default in cPanel You can use the "http -M" command to verify that Mod_Rewrite is compiled with Apache (it's enabled by default with cPanel):在 cPanel 中默认启用 mod_rewrite 您可以使用“http -M”命令来验证 Mod_Rewrite 是否是使用 Apache 编译的(默认情况下使用 cPanel 启用):

httpd -M|grep rewrite
rewrite_module (shared)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM