About 9 months ago i changed my permalink structure in WordPress from the domain.com/year/month/article-name
format to the domain.com/article-name
one.
I hired someone to do the rewrite rules for me. The person seemed to have done a good job, as all links i tested redirected as expected.
1 month ago I moved my website to a new server. The friend who moved it, first copied my website to his own server, then installed it on a droplet on digitalocean. In this process the individual also made changes to the .htaccess
file.
I seem to now have lost all my redirects from the previous change.
I have tried the following:
- Based on this article I attempted to make a change to the line
RewriteBase /
in the WordPress section toRewriteBase /web/
. This broke my website, so i changed it back. - Moving the WordPress section to the beginning of the file. It seems to do nothing.
How can I reimplement the former redirect... I unfortunately lost all earlier versions of the file.
# RewriteRule ^9671126861/(.*)$ guzzle-downslope.php [QSA,L]
<ifmodule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 1 seconds"
ExpiresByType text/html "access plus 7200 seconds"
ExpiresByType image/x-icon "access plus 8640000 seconds"
ExpiresByType image/gif "access plus 8640000 seconds"
ExpiresByType image/jpeg "access plus 86400000 seconds"
ExpiresByType image/jpg "access plus 86400000 seconds"
ExpiresByType image/png "access plus 86400000 seconds"
ExpiresByType text/css "access plus 8640000 seconds"
ExpiresByType text/javascript "access plus 864000000 seconds"
ExpiresByType application/x-javascript "access plus 864000000 seconds"
ExpiresByType application/javascript "access plus 864000000 seconds"
ExpiresByType font/ttf "access plus 8640000 seconds"
ExpiresByType font/otf "access plus 8640000 seconds"
ExpiresByType application/vnd.ms-fontobject "access plus 8640000 seconds"
ExpiresByType application/x-woff "access plus 8640000 seconds"
ExpiresByType application/x-font-ttf "access plus 864000000 seconds"
ExpiresByType application/x-font-woff "access plus 8640000 seconds"
ExpiresByType application/vnd.ms-fontobject "access plus 864000000 seconds"
ExpiresByType image/svg+xml "access plus 8640000 seconds"
ExpiresByType image/vnd.microsoft.icon "access plus 8640000 seconds"
</ifmodule>
# BEGIN WPSuperCache
# END WPSuperCache
# BEGIN optimizeMember GZIP exclusions
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{QUERY_STRING} (^|\?|&)optimizemember_file_download\=.+
RewriteRule .* - [E=no-gzip:1]
</IfModule>
# END optimizeMember GZIP exclusions
# BEGIN rlrssslReallySimpleSSL rsssl_version[3.2.3]
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTPS} !=on [NC]
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
</IfModule>
# END rlrssslReallySimpleSSL
# 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
php_value upload_max_filesize 25MB
php_value post_max_size 27MB
php_value memory_limit 30MB