Home htaccess worpress rewriterule not working 404 error

# htaccess worpress rewriterule not working 404 error

molinet
1#
molinet Published in 2018-01-09 09:35:31Z
 I'm attempting to make a rewriterule for a page to load the content of another one and show the proper information. RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^index\.php/file/(.*)$index.php/file/?value=$1 [L,QSA] RewriteRule ^index\.php$- [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] When i put my url it shows me a 404 error but the "index.php/file/?value=$1" is working fine for me. Any help? EDIT: Still not working... I've been dealing with this issue for almost a week so if someone knows how to make this work please tell me. EDIT 2 [SOLUTION]: I finally get to solve my problem. The point is that I needed to make some changes into my functions.php file from the wp theme: add_filter('query_vars', 'add_state_var', 0, 1); function add_state_var($vars){$vars[] = 'value'; return $vars; } add_rewrite_rule('^file/([^/]+)/?$','index.php? pagename=file&value=$matches[1]','top'); and leave my .htaccess file like: RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] Hope this could help somebody!
Rich Bowen
2#
Rich Bowen Reply to 2018-01-11 15:44:28Z
 We also recommend that you drop that entire RewriteRule block and replace it with the one line: FallbackResource /index.php This eliminates the complexity and fragility of the rewrites and is more efficient.
 You need to login account before you can post.
Processed in 0.345503 second(s) , Gzip On .