Have subdirectory name act as $_GET or $_POST data
Well, what do you know — there’s a plugin for that: https://wordpress.org/plugins/redirection/ Under the “redirects” tab in the plugin’s settings you can set as many redirect rules as you’d like.
Well, what do you know — there’s a plugin for that: https://wordpress.org/plugins/redirection/ Under the “redirects” tab in the plugin’s settings you can set as many redirect rules as you’d like.
Are you sure the rewrite module is enabled? Type: a2enmod rewrite If you are on Linux or equivalent for your platform/setup. You can also try: ls /etc/apache2/mods-enabled/ and look for the rewrite module in there?
Try replacing your line with this RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^([^\.]+)$ $1.php [NC,L]
i found a solution with no use of htaccess but using the WP function wp_redirect. copy and past on functions.php function redirect_paginated_404() { if (is_404()) { $url = $_SERVER[‘REQUEST_URI’]; //read the url $search=”/page/”; //chose the word of the url if ( strpos( $url, $search ) !== false ) { //if i find the string /page/ … Read more
ModRewrite not working properly
What to do after a wrong RewriteRule?
It should work with this lines which simply remove the .php from files that end with .php: RewriteCond %{REQUEST_FILENAME}.php -f RewriteRule !.*\.php$ %{REQUEST_FILENAME}.php [QSA,L]
You are redirecting the entire domain hence breaking the site, because whole website is getting redirected to a part causing a broken website. So instead of using .htaccess just create an index.html file in your root and do a simple Meta Refresh Or Use this more detailed explanation to do the same using php
I solved it. Apache server doesn’t allow VHosts pointing to outside /var/www. So I changed all (Document root AND Directory) to /var/www/site and it worked on all sites, with permalinks working fine.
Turns out the file was the problem, as @TheDeadMedic suspected. The permissions were 640. After changing them to 644, the problem was solved! Thanks for the help.