首页
\
问答
\
如何通过ssh检查ubuntu服务器上的php和apache的存在(How to check the presence of php and apache on ubuntu server through ssh)
如何通过ssh检查ubuntu服务器上的php和apache的存在(How to check the presence of php and apache on ubuntu server through ssh)
如何通过ssh检查Ubuntu服务器上apache是否安装有php和mysql?
另外如果是安装的,哪个目录?
如果安装了其他一些软件包,就像lighttpd那样。
How can I check whether apache is installed with php and mysql on Ubuntu server through ssh?
Also if it is installed, in which directory?
And if in case some other package is installed, like lighttpd, where that is.
原文:https://stackoverflow.com/questions/1776312
更新时间:2022-10-16 07:10
最满意答案
把它放在规则之前的那一行:
RewriteCond %{REQUEST_FILENAME} !-f
Put this on the line before the rule:
RewriteCond %{REQUEST_FILENAME} !-f
相关问答
更多-
将此规则添加到htaccess RewriteCond $1.js.php -f RewriteRule ([\w\-]+)\.js$ $1.js.php [L] Add this rule to htaccess RewriteCond $1.js.php -f RewriteRule ([\w\-]+)\.js$ $1.js.php [L]
-
把它放在规则之前的那一行: RewriteCond %{REQUEST_FILENAME} !-f Put this on the line before the rule: RewriteCond %{REQUEST_FILENAME} !-f
-
重写文件扩展名的规则(Rewrite rule for file extension)[2022-01-12]
尝试修改第一个规则以从模式中排除句点。 例如: RewriteRule ^myapi/([^/.]+)$ normalPage.php?feed=$1 [L] Try modifying the first rule to exclude periods from the pattern. For example: RewriteRule ^myapi/([^/.]+)$ normalPage.php?feed=$1 [L] -
-表示“传递URI并且不执行任何操作”。 它基本上对URI没有任何作用,只应用标志,在这种情况下返回404。 有关详细信息,请参阅“ - (破折号) ”下的mod_rewrite文档 短划线表示不应执行替换(现有路径未经过触摸传递)。 当需要在不改变路径的情况下应用标志(见下文)时使用。 The - means "pass the URI through and do nothing". It essentially does nothing to the URI and only applies the ...
-
我无法在我的.htaccess文件中使用第二个重写规则(I can't get the second rewrite rule to work in my .htaccess file)[2024-02-25]
您需要将主题规则放在index.php的常规路径之前 。 你需要引用/theme/之后的内容,例如: RewriteRule ^theme(/?.*)$ theme.php$1 [L] 此外,如果您启用了Multiviews ,此规则将无效,但是,这实际上非常适合Multiviews ,因此您可以尝试启用它而不是使用规则来重写theme : Options +Multiviews You need to put your theme rule before the general route to in ... -
mod_rewrite .htaccess重写匹配带或不带文件扩展名(mod_rewrite .htaccess rewrite match with or without file extension)[2022-04-11]
从php中完成所有这些操作会更好。 正则表达式无法做你想做的一切,尤其是不得不处理名字中的任意时期。 所以你只想要第二个规则: RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^([^/]+)/?$ /loadlink.php?link=$1 [L,QSA] 请注意,重写条件仅适用于紧随其后的RewriteRule 。 这将把所有内容发送到“链接”参数 ... -
你可以这样做。 RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.+)/?$ /index.php?file=$1 [NC,L] 让我知道结果。 You could just do this. RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILE ...
-
添加此项以禁用MultiViews: Options -MultiViews 关于mod_negotiation的Apache文档描述了Multiviews选项在启用时的功能: 如果服务器收到对/ some / dir / foo的请求并且/ some / dir / foo不存在,那么服务器会读取目录,查找名为foo。*的所有文件,并有效地伪造一个类型映射,该映射将所有这些命名为如果客户端通过名称请求其中一个文件,则为它们分配相同的媒体类型和内容编码。 然后,它会根据客户的要求选择最佳匹配,并返回该文档 ...
-
将此代码放在DOCUMENT_ROOT目录下的.htaccess : Options +FollowSymLinks -MultiViews # Turn mod_rewrite on RewriteEngine On RewriteBase / ## Adding a trailing slash RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_URI} !/$ RewriteRule . %{REQUEST_URI}/ [L,R=30 ...
-
您可以使用: RewriteEngine On Options -MultiViews # Redirect to http(s)://www RewriteCond %{HTTP_HOST} !^$ RewriteCond %{HTTP_HOST} !^www\. [NC] RewriteCond %{HTTPS}s ^on(s)| RewriteRule ^ http%1://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L] # remove php RewriteC ...