Jghake
Forum Replies Created
-
I have this problem as well. Where do I start looking?
Forum: Fixing WordPress
In reply to: Problems Setting Permalinks to /%postname%/Sorry didn’t mark it as closed.
Forum: Fixing WordPress
In reply to: Problems Setting Permalinks to /%postname%/I was able to resolve this myself. For anyone else who has their WordPress install located in /var/www/wordpress and their site URL set to https://mysite.com (preventing the url including ‘/wordpress’) here are all of my settings. I don’t know if these changes are all required, but it is working and I am going to stop touching it before it breaks.
/var/www/.htaccess
# For rewrite rules needed for making WordPress URL friendly # See Options -> Permalinks for details and please use the defaults, # especially in mind when hosting several blogs on one machine! ## ## Configuration for a single blog hosted on / (root of the website) ## #<IfModule mod_rewrite.c> #RewriteEngine On #RewriteBase / #RewriteCond %{REQUEST_FILENAME} !-f #RewriteCond %{REQUEST_FILENAME} !-d #RewriteRule . /index.php [L] #</IfModule> ## ## Configuration for a multi-site wordpress installation using subdomains ## #<IfModule mod_rewrite.c> #RewriteEngine On #RewriteBase / #RewriteRule ^index\.php$ - [L] ## uploaded files #RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L] ## real files dealt directly #RewriteCond %{REQUEST_FILENAME} -f [OR] #RewriteCond %{REQUEST_FILENAME} -d #RewriteRule ^ - [L] ## other go through index.php #RewriteRule . index.php [L] #</IfModule> # 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
/var/www/wordpress/.htaccess
# For rewrite rules needed for making WordPress URL friendly # See Options -> Permalinks for details and please use the defaults, # especially in mind when hosting several blogs on one machine! ## ## Configuration for a single blog hosted on / (root of the website) ## #<IfModule mod_rewrite.c> #RewriteEngine On #RewriteBase / #RewriteCond %{REQUEST_FILENAME} !-f #RewriteCond %{REQUEST_FILENAME} !-d #RewriteRule . /index.php [L] #</IfModule> ## ## Configuration for a multi-site wordpress installation using subdomains ## #<IfModule mod_rewrite.c> #RewriteEngine On #RewriteBase / #RewriteRule ^index\.php$ - [L] ## uploaded files #RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L] ## real files dealt directly #RewriteCond %{REQUEST_FILENAME} -f [OR] #RewriteCond %{REQUEST_FILENAME} -d #RewriteRule ^ - [L] ## other go through index.php #RewriteRule . index.php [L] #</IfModule>
/etc/apache2/sites-enabled/000-default
<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> <Directory /var/www/wordpress/> Options FollowSymlinks 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 None Order deny,allow Deny from all Allow from 127.0.0.0/255.0.0.0 ::1/128 </Directory> </VirtualHost>
Forum: Fixing WordPress
In reply to: Problems Setting Permalinks to /%postname%/Sorry /var/www/ and /var/www/wordpress is what I meant
Forum: Fixing WordPress
In reply to: Problems Setting Permalinks to /%postname%/There are two of those as well. Both in /var/www/.htaccess and /var/www/wordpress/.htaccess
Forum: Fixing WordPress
In reply to: Problems Setting Permalinks to /%postname%/I followed this guide here so I have two .htaccess. If this isn’t correct let me know.
/var/www/wordpress/.htaccess
# For rewrite rules needed for making WordPress URL friendly # See Options -> Permalinks for details and please use the defaults, # especially in mind when hosting several blogs on one machine! ## ## Configuration for a single blog hosted on / (root of the website) ## #<IfModule mod_rewrite.c> #RewriteEngine On #RewriteBase / #RewriteCond %{REQUEST_FILENAME} !-f #RewriteCond %{REQUEST_FILENAME} !-d #RewriteRule . /index.php [L] #</IfModule> ## ## Configuration for a multi-site wordpress installation using subdomains ## #<IfModule mod_rewrite.c> #RewriteEngine On #RewriteBase / #RewriteRule ^index\.php$ - [L] ## uploaded files #RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L] ## real files dealt directly #RewriteCond %{REQUEST_FILENAME} -f [OR] #RewriteCond %{REQUEST_FILENAME} -d #RewriteRule ^ - [L] ## other go through index.php #RewriteRule . index.php [L] #</IfModule>
/var/www/.htaccess
# For rewrite rules needed for making WordPress URL friendly # See Options -> Permalinks for details and please use the defaults, # especially in mind when hosting several blogs on one machine! ## ## Configuration for a single blog hosted on / (root of the website) ## #<IfModule mod_rewrite.c> #RewriteEngine On #RewriteBase / #RewriteCond %{REQUEST_FILENAME} !-f #RewriteCond %{REQUEST_FILENAME} !-d #RewriteRule . /index.php [L] #</IfModule> ## ## Configuration for a multi-site wordpress installation using subdomains ## #<IfModule mod_rewrite.c> #RewriteEngine On #RewriteBase / #RewriteRule ^index\.php$ - [L] ## uploaded files #RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L] ## real files dealt directly #RewriteCond %{REQUEST_FILENAME} -f [OR] #RewriteCond %{REQUEST_FILENAME} -d #RewriteRule ^ - [L] ## other go through index.php #RewriteRule . index.php [L] #</IfModule> # 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