I feel like I have read every blog or post on this topic but there are so many out there... I still seem to be missing SOMETHING.I don't know what. My site is hosted on Amazon EC2.
My mod rewrite module is definitely working. I used to have the following in my .htaccess to no avail:
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
Then, I did "chmod -v 666 .htaccess" to make sure Wordpress could accesss it.
My /etc/apache2/sites-available/default looks like this
DocumentRoot /var/www
<Directory />
Options FollowSymLinks
# AllowOverride FileInfo
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
# AllowOverride FileInfo
Order allow,deny
allow from all
</Directory>
And my /etc/apache2/sites-enabled/000-default looks like this, due to the advice of another thread
<Directory />
Options FollowSymLinks
# AllowOverride FileInfo
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
# AllowOverride FileInfo
Order allow,deny
开发者_如何学Python allow from all
</Directory>
When I restarted Apache, all the text listed above in my .htaccess disappeared and pretty permalinks still do not work. Any one know what I should do next????
In your Apache conf, you need to enable the .htaccess files:
AllowOverride All
Probably you did, but didn't mention so I ask to make sure.. Did you set your desired permalink structure in wp admin? Settings -> Permalinks? I suggest to try Custom structure like /%category%/%postname%/ or /%postname%/
精彩评论