•  · 3 friends

rewrite_module - FAIL (you will need to install rewrite_module for Apache)

Cant fix the rewrite module error, this is what I see and what I have completed to resolve, no solution yet.

Web-server: Apache/2.4.25 (Debian) 

  • rewrite_module - FAIL (you will need to install rewrite_module for Apache)

PHP7.2

CMD>  sudo a2enmod rewrite

Module rewrite already enabled


CMD> apachectl -M 2>&1 | grep rewrite_module 

 rewrite_module (shared)

 

HTACCESS

.htaccess is also correct as per UNA: https://github.com/unaio/una/blob/master/.htaccess 

/page/login -> NOT LOADING

Permalinks


✅ Enable friendly permalinks for Pages
✅ Enable friendly permalinks for Modules
✅ Enable friendly permalinks for local Storage


NOT LOADING:>    

https://MyWebSite/page/login 

https://MyWebSite/page/view-persons-profile?id=22718 

All help is very much needed and appreciated, this is the first time I am doing this. Thank you for helping.






0 0 0 0 0 0
  • 181
Replies (3)
  • If you read the post above you had same problem as me.

    If the steps did not help, here is how I solved the problem. You should not need to google for hours to find the answers and this should work. 

    HTACCESS IS NOT WORKING

    There are a plethora of reasons why it might not work on your system, and these reasons vary so wildly, that we can't give an exhaustive solution for that. 

    That said, here are a few pointers that might help you fix it:

    Enable .htaccess in your httpd.conf or apache.conf¶

    It's unusual, but possible that .htaccess is not enabled on your site. If you are hosting it yourself, it's easy enough to fix. 

    FOR BEGINNERS: If you do not know the locations of your files, search for them with find command:   "FIND path -name FILENAME"

    CMD> find / -name apache2.conf

    Open your httpd.conf or apache.conf in a text editor, and locate the section:

        AllowOverride None

     Change the AllowOverride line to:

        AllowOverride All

    Be sure to restart Apache after making any modifications to this file. Now, your .htaccess should work. You can also make this change inside a virtual host, which would normally be preferable, but that depends on the way Apache is set up.

    If your site is hosted elsewhere, check your control panel (Plesk, DirectAdmin, CPanel, whatever) to see if you can enable .htaccess there. If not, contact your hosting provider to do it for you.

    Enable mod_rewrite in Apache¶

    There are a number of ways to enable mod_rewrite, in case it's not yet enabled on your setup. See this Stack Overflow thread for various ways this may be done on different setups: How to enable mod_rewrite for Apache 2.2.


    Test if .htaccess is working¶

    The simplest way to test if apache uses your .htaccess file, or if it otherwise ignores it, is to intentionally break it.

    Edit the .htaccess file, so the first line reads 'Test.':

    Now, if you refresh the page in your browser, you should see an error page like this:

    Internal Server Error

    If you see this error, IT IS GOOD! This means that Apache is parsing the .htaccess file, and it encounters the error we've put in there! So far, so good!

    Apache Setup Ignores the HTACCESS

    If you do not see an 'Internal Server Error', your Apache setup ignores the .htaccess file, and you need to fix that. Generally, Apache ignores the .htaccess file because of the following Apache configuration AllowOverride none. Check your virtual host configuration and add/amend to AllowOverride All.

    Example:
        
            Options Indexes FollowSymLinks
            AllowOverride All
            Require all granted
        

    If you are not sure if the .htaccess file exists and is readable, download the file from the GITHUB repository: https://github.com/unaio/una/blob/master/.htaccess   

     

    0 0 0 0 0 0
    • Hello Fine !

      It's better to check it with the hosting support (as we may see the rewrite_module (shared) form your commands). There may be the AllowOverride None and AllowOverride All directives troubles or some other reasons.

      PS your same question in other thread has been deleted, no need to duplicate the similar posts in the different places please.

      0 0 0 0 0 0
      • I have the same situation. Apache mod_rewrite DOES work. I commented some lines out in my htaccess file and created a simple rewrite; it worked fine. It works on my other sites on this server and I make heavy use of it. Even so, the UNA installation script thinks it is not installed. I plan to go ahead with the installation and ignore the error.

        0 0 0 0 0 0
        Not logged in users can't 'Comments Post'.
        2
        1
        1
        Labels:
        Added:
        Category:

        UNA - Social Media Software Framework

        Close