So I have a .htaccess file and what I had put in it is not working.
This is what I put:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule (.*) $1.php [L]
RewriteCond %{REQUEST_FILENAME}.html -f
RewriteRule (.*) $1.html [L]

Im trying to get rid of file extensions. Ive tried similar variations of that and it hasnt worked. Am I doing something wrong?

1 comment
  • Solved:
    Went to Apache Config file and set AllowOverride to All.
    Ubuntu 18.04 Commands:
    1:

    sudo nano /etc/apache2/apache2.conf
    

    2:

    ctrl w
    

    Then searched “AllowOverride”
    3:
    The last directory was where my index and .htaccess was so then I changed it from “none” to “all”
    4:

    ctrl o then ctrl x
    

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
Submit an Answer
1 answer
ARCHIVED: We have created a one-click Wordpress installation with permalinks enabled that uses Apache/MySQL/PHP on Ubuntu 16.04 x64.