Changing Permalinks settings breaks my site (Error 404)
-
My situation is almost exactly the same as this one with the exception that I have wordpress installed on an Ubuntu Server (running in a virtual machine).
I’ve enabled mod_rewrite and changed the permissions on the .htaccess file in my wordpress directory to allow writing. Also I changed my default site in the sites-avaiable to wordpress (reflecting the directory that all of my wordpress content/settings are located in).
I can go to https://dcky-wp-test/ which is my hostname for the virtual machine, and it loads up the page regardless of which permalink structure is set up. However, if I have any setting aside from the default, no other pages load. They all give 404 Errors.
Here is my complete .htaccess file from the wordpress directory (there isn’t one in /var/www, so that’s not the problem)
Options +FollowSymlinks # BEGIN W3TC Browser Cache <IfModule mod_deflate.c> <IfModule mod_setenvif.c> BrowserMatch ^Mozilla/4 gzip-only-text/html BrowserMatch ^Mozilla/4\.0[678] no-gzip BrowserMatch \bMSIE !no-gzip !gzip-only-text/html BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html </IfModule> <IfModule mod_headers.c> Header append Vary User-Agent env=!dont-vary </IfModule> <IfModule mod_filter.c> AddOutputFilterByType DEFLATE text/css application/x-javascript text/x-$ </IfModule> </IfModule> <FilesMatch "\.(css|js|htc|CSS|JS|HTC)$"> FileETag None <IfModule mod_headers.c> Header set X-Powered-By "W3 Total Cache/0.9.2.4" </IfModule> </FilesMatch> <FilesMatch "\.(html|htm|rtf|rtx|svg|svgz|txt|xsd|xsl|xml|HTML|HTM|RTF|RTX|SVG|$ FileETag None <IfModule mod_headers.c> Header set X-Powered-By "W3 Total Cache/0.9.2.4" </IfModule> </FilesMatch> <FilesMatch "\.(asf|asx|wax|wmv|wmx|avi|bmp|class|divx|doc|docx|eot|exe|gif|gz|$ FileETag None <IfModule mod_headers.c> Header set X-Powered-By "W3 Total Cache/0.9.2.4" </IfModule> </FilesMatch> # END W3TC Browser Cache # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress
And here is the wordpress.conf file from my /etc/apache2/sites-available directory
<VirtualHost *:80> ServerAdmin webmaster@localhost DocumentRoot /var/www/wordpress <Directory /> Options FollowSymLinks AllowOverride None </Directory> <Directory /var/www/wordpress/> Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all </Directory> ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ <Directory "/usr/lib/cgi-bin"> AllowOverride None Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch Order allow,deny Allow from all </Directory> ErrorLog ${APACHE_LOG_DIR}/error.log # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. LogLevel warn CustomLog ${APACHE_LOG_DIR}/access.log combined Alias /doc/ "/usr/share/doc/" <Directory "/usr/share/doc/"> Options Indexes MultiViews FollowSymLinks AllowOverride None Order deny,allow Deny from all Allow from 127.0.0.0/255.0.0.0 ::1/128 </Directory> </VirtualHost>
Here is the default.conf file from the same directory
<VirtualHost *:80> ServerAdmin webmaster@localhost DocumentRoot /var/www <Directory /> Options FollowSymLinks AllowOverride all </Directory> <Directory /var/www/> Options Indexes FollowSymLinks MultiViews AllowOverride all Order allow,deny allow from all </Directory> ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ <Directory "/usr/lib/cgi-bin"> AllowOverride None Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch Order allow,deny Allow from all </Directory> ErrorLog ${APACHE_LOG_DIR}/error.log # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. LogLevel warn CustomLog ${APACHE_LOG_DIR}/access.log combined Alias /doc/ "/usr/share/doc/" <Directory "/usr/share/doc/"> Options Indexes MultiViews FollowSymLinks AllowOverride all Order deny,allow Deny from all Allow from 127.0.0.0/255.0.0.0 ::1/128 </Directory> </VirtualHost>
I also posted this question (without the files) in the HowTo-Troubleshooting forum, but found another similar posting there which had a reply stating that it belonged in this forum. So I’m reposting here, in hopes that I get an answer.
Thanks, and have a great day:)
Patrick.
- The topic ‘Changing Permalinks settings breaks my site (Error 404)’ is closed to new replies.