How do I get WordPress Rewrite to work properly with Apache?
I still can't get ReWrite to work for Wordpress.
Not Found
The requested URL was not found on this server.
Apache/2.4.25 (Debian) Server at example.com Port 443
Any help is appreciated.
Thanks
6 Replies
Hey there,
You'll want to make sure that you've updated your wordpress site's apache config to include the following options. This will instruct Apache to allow individual sites to update the .htaccess file.
<Directory /var/www/html/example.com/public_html>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
Once you have updated your apache configuration, you'll need to reload the Apache service by running sudo systemctl reload apache2
.
If you're still running into issues, you'll want to look at whether the .htaccess file is properly configured. If you're not sure how to configure your .htaccess file or how to format the rules you'd like to apply, you can take a look at this rule generator that can help with making sure all of your rules are formatted correctly.
I hope the information I provided helps.
Regards,
Ryan L.
Linode Support Staff
FYI, just got this : Failed to reload apache2..service: Unit apache2..service not found.
Added above Config suggestion to :
/etc/apache2/sites-available/000-default.conf
Is that the correct conf file ?
Will restart via Dashboard and see what happens.
Got this structure :
/var/www/html
/var/www/wordpress
So maybe need to change the suggestion from :
<Directory /var/www/html/example.com/public_html>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
To :
<Directory /var/www/wordpress ???
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
@viewr --
It would be very helpful to go through your last 2 posts and format them properly by adding 3 backticks (```) before/after sections of apache2 configuration directives.
The backticks turn the section into code where the '>' and '<' characters are not interpreted by the markdown processor (like in @rl0nergan's post above).
If you do this, we can all see what you're talking about. The way it is now, what you posted is just gibberish. For more information, see the Markdown Cheatsheet link to the right. Here's another one.
-- sw