Sunday, May 4, 2014

Custom files redirection error on wordpress

Even though the permissions for the folders and files are correct, a 404 error kept showing on the wordpress site. This can be resolved by modifying the .htaccess file and modifying the headers to something like this (the highlighted section is what is new):


RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} ^/rest/(.*)$ [OR]
RewriteRule ^.*$ - [L]

# BEGIN WordPress

RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]


# END WordPress

No comments: