Broken Permalinks
-
I’m moving a blog from a dedicated subdomain (https://blog.) to a subdirectory under the main domain (/blog/). I’ve done this by setting up a new WP installation in the subdirectory and then exporting the data from the previous blog and importing it to the new one.
It mostly works, but there are problems with the permalinks. Here’s what I know.
- With the permalinks set to “plain” everything works as it should.
- When I change the permalinks to “month and name” they stop working.
- Changing the permalinks setting does not write an htaccess file to the subdirectory.
- Manually copying an htaccess file into the subdirectory changes the behaviour, but doesn’t fix things.
Without an htaccess file, clicking a link gives an Apache 404 page as I would expect. But when I add an htaccess file that changes to give a plain text file simply saying “File not found.” I assume that’s generated by WordPress.
So, I think I see two weird things here:
- Changing the permalink settings doesn’t write an htaccess file.
- Even with an htaccess file, the permalinks don’t work.
I’ve checked that the WP user has write access to the subdirectory (and I don’t get the htaccess error message that I’d expect to see if that wasn’t the case).
This is WP Version 4.9.5 with only the WordPress importer plugin installed.
Here’s the manual htaccess file that I’ve been using:
# 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>
Please let me know if there’s any other information that could be useful to diagnose this issue.
The page I need help with: [log in to see the link]
- The topic ‘Broken Permalinks’ is closed to new replies.