WordPress doesn't work with .htaccess

Been around houses with this - read a lot of htaccess issues etc. - and still can't get it to work.

I have a WordPress site installed at var/www

I wanted a specific url to point to a specific page. A preview of some WordPress plugins will start. None of them worked, so I just went straight to the source and started editing the file .htaccess

in the root of my WordPress installation. This is where it started to get frustrating.

One of many file attempts .htaccess

:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
Options +FollowSymLinks
Redirect 301 /redirect-me http://my-wordpress-site/?page_id=15
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress

      

All redirection attempts resulted in 404 Not Found errors.

I have stated the following things:

  • Apache2 rewrite module enabled
  • www-data

    has both read and write access to the file .htaccess

    .
  • AllowOverride

    set to All

    in file apache2.conf

    for directory

Here's a big clue for you: replacing the last ReWrite rule in my file .htaccess

does absolutely nothing on my WordPress site ...

RewriteRule . /poo.php [L]

      

Any other suggestions for debugging the failing file .htaccess

?

+3


source to share


1 answer


When you make configuration changes such as AllowOverride

configuration, make sure you restart on Apache2 for the changes to take effect. Make it a shot.



+1


source







All Articles