个人工具

“UbuntuHelp:Apache/EnablingModRewrite”的版本间的差异

来自Ubuntu中文

跳转至: 导航, 搜索
 
(未显示同一用户的1个中间版本)
第1行: 第1行:
 
{{From|https://help.ubuntu.com/community/Apache/EnablingModRewrite}}
 
{{From|https://help.ubuntu.com/community/Apache/EnablingModRewrite}}
 
{{Languages|UbuntuHelp:Apache/EnablingModRewrite}}
 
{{Languages|UbuntuHelp:Apache/EnablingModRewrite}}
<pre><nowiki>mod_rewrite</nowiki></pre> was not enabled, by default, on my Apache installation.  I am on Ubuntu 7.10 (which is in development, at present).  To enable it, I simply issued the following commands:
+
<code><nowiki>mod_rewrite</nowiki></code> was not enabled, by default, on my Apache installation.  I am on Ubuntu 7.10 (which is in development, at present).  To enable it, I simply issued the following command:
 
<pre><nowiki>
 
<pre><nowiki>
cd /etc/apache2/mods-enabled
+
sudo a2enmod rewrite
sudo ln -s ../mods-available/rewrite.load ./
+
 
</nowiki></pre>
 
</nowiki></pre>
 +
and then restart apache with:
 +
<pre><nowiki>
 +
sudo /etc/init.d/apache2 force-reload
 +
</nowiki></pre>
 +
To disable it, simply
 +
<pre><nowiki>
 +
sudo a2dismod rewrite
 +
</nowiki></pre>
 +
and then restart apache with the above command.
  
 
[[category:UbuntuHelp]]
 
[[category:UbuntuHelp]]

2008年10月19日 (日) 04:12的最新版本


mod_rewrite was not enabled, by default, on my Apache installation. I am on Ubuntu 7.10 (which is in development, at present). To enable it, I simply issued the following command:

sudo a2enmod rewrite

and then restart apache with:

sudo /etc/init.d/apache2 force-reload

To disable it, simply

sudo a2dismod rewrite

and then restart apache with the above command.