<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://deltanine.net/mw/index.php?action=history&amp;feed=atom&amp;title=Enable_Apache_Rewrite_via_htaccess</id>
	<title>Enable Apache Rewrite via htaccess - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://deltanine.net/mw/index.php?action=history&amp;feed=atom&amp;title=Enable_Apache_Rewrite_via_htaccess"/>
	<link rel="alternate" type="text/html" href="https://deltanine.net/mw/index.php?title=Enable_Apache_Rewrite_via_htaccess&amp;action=history"/>
	<updated>2026-04-27T19:23:23Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.32.1</generator>
	<entry>
		<id>https://deltanine.net/mw/index.php?title=Enable_Apache_Rewrite_via_htaccess&amp;diff=393&amp;oldid=prev</id>
		<title>Chris: 1 revision</title>
		<link rel="alternate" type="text/html" href="https://deltanine.net/mw/index.php?title=Enable_Apache_Rewrite_via_htaccess&amp;diff=393&amp;oldid=prev"/>
		<updated>2013-07-25T08:08:07Z</updated>

		<summary type="html">&lt;p&gt;1 revision&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 08:08, 25 July 2013&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Chris</name></author>
		
	</entry>
	<entry>
		<id>https://deltanine.net/mw/index.php?title=Enable_Apache_Rewrite_via_htaccess&amp;diff=392&amp;oldid=prev</id>
		<title>Chris at 17:04, 19 April 2010</title>
		<link rel="alternate" type="text/html" href="https://deltanine.net/mw/index.php?title=Enable_Apache_Rewrite_via_htaccess&amp;diff=392&amp;oldid=prev"/>
		<updated>2010-04-19T17:04:07Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;__FORCETOC__&lt;br /&gt;
&lt;br /&gt;
==1st Method==&lt;br /&gt;
For Yii I had the problem where the rewrite in the htaccess file wasn't working&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Options +FollowSymLinks&lt;br /&gt;
IndexIgnore */*&lt;br /&gt;
RewriteEngine on&lt;br /&gt;
&lt;br /&gt;
# if a directory or a file exists, use it directly&lt;br /&gt;
RewriteCond %{REQUEST_FILENAME} !-f&lt;br /&gt;
RewriteCond %{REQUEST_FILENAME} !-d&lt;br /&gt;
&lt;br /&gt;
# otherwise forward it to index.php&lt;br /&gt;
RewriteRule . index.php&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This was because Apache2 didn't have rewrite enabled by default, and the default site configuration had AllowOverrides set to None&lt;br /&gt;
&lt;br /&gt;
First I created a symlink&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo ln -s /etc/apache2/mods-available/rewrite.load /etc/apache2/mods-enabled/rewrite.load&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo gedit /etc/apache2/sites-enabled/000-default&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
change AllowOverride None to AllowOverride All thus:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
DocumentRoot /var/www&lt;br /&gt;
	&amp;lt;Directory /&amp;gt;&lt;br /&gt;
		Options FollowSymLinks&lt;br /&gt;
		AllowOverride All&lt;br /&gt;
	&amp;lt;/Directory&amp;gt;&lt;br /&gt;
	&amp;lt;Directory /var/www/&amp;gt;&lt;br /&gt;
		Options Indexes FollowSymLinks MultiViews&lt;br /&gt;
		AllowOverride All&lt;br /&gt;
		Order allow,deny&lt;br /&gt;
		allow from all&lt;br /&gt;
	&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Restart Apache&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo /etc/init.d/apache2/restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==2nd Method==&lt;br /&gt;
From Zend setup:&lt;br /&gt;
===Configure Apache===&lt;br /&gt;
We need to make sure that rewrite_module is enabled in apache2 for the Zend Framework to work properly, so lets check:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
a2dismod&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Hopefully you should see rewrite listed in the list of modules that are currently enabled. If not, press enter to disable nothing and then issue:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
a2enmod rewrite&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Then we need to enable AllowOverride All in the default site file&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo gedit /etc/apache2/sites-available/default&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[...]&lt;br /&gt;
  DocumentRoot /var/www/&lt;br /&gt;
        &amp;lt;Directory /&amp;gt;&lt;br /&gt;
                Options FollowSymLinks&lt;br /&gt;
                AllowOverride All&lt;br /&gt;
        &amp;lt;/Directory&amp;gt;&lt;br /&gt;
        &amp;lt;Directory var/www/&amp;gt;&lt;br /&gt;
                Options FollowSymLinks &lt;br /&gt;
                AllowOverride All&lt;br /&gt;
                Order allow,deny&lt;br /&gt;
                allow from all&lt;br /&gt;
        &amp;lt;/Directory&amp;gt;&lt;br /&gt;
[...]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Restart Apache afterwards:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo /etc/init.d/apache2 restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Chris</name></author>
		
	</entry>
</feed>