我想在本地环境中运行我的网站代码。 问题是,我的本地Silex无法像在CPanel服务器中一样工作。
CPanel Silex WebServer配置文件位于何处? 我想查看它并使我的本地Silex配置与它相同。
更新:
我的意思是用WebServer配置基于这个链接: http : //silex.sensiolabs.org/doc/master/web_servers.html
例如,对于Silex来说,如果我们使用Apache,我们需要使用htaccess文件来配置Web服务器:
<IfModule mod_rewrite.c> Options -MultiViews RewriteEngine On #RewriteBase /path/to/app RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^ index.php [QSA,L] </IfModule>I want to run my site's code in the local environment. The problem is, my local Silex doesn't work just like in the CPanel server.
Where is the CPanel Silex WebServer configuration file located? I want to view it and make my local Silex configuration the same with it.
UPDATE:
What I mean with WebServer configuration is based on this link: http://silex.sensiolabs.org/doc/master/web_servers.html
For Silex to work, for example, if we use Apache, we need to configure the web server by using htaccess file:
<IfModule mod_rewrite.c> Options -MultiViews RewriteEngine On #RewriteBase /path/to/app RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^ index.php [QSA,L] </IfModule>最满意答案
终于找到了我自己的答案。
在public_html文件夹中,您需要找到.htaccess文件。 如果您看不到它,请将文件管理器设置为显示来自设置的隐藏文件。 将.htaccess复制到您的本地环境,就是这样。
Finally found the answer on my own.
In public_html folder, you need to find .htaccess file. If you can't see it, set the File Manager to show hidden files from settings. Copy that .htaccess to your local environment and that's it.
更多推荐
发布评论