Our Sponsors



Download BioinformaticsOnline(BOL) Apps in your chrome browser.




Fix rewritable error of ELGG !

https://www.digitalocean.com/community/tutorials/how-to-rewrite-urls-with-mod_rewrite-for-apache-on-ubuntu-18-04

The mod_rewrite module uses a rule-based rewriting engine, based on a PCRE regular-expression parser, to rewrite requested URLs on the fly. By default, mod_rewrite maps a URL to a filesystem path. However, it can also be used to redirect one URL to another URL, or to invoke an internal proxy fetch.

mod_rewrite provides a flexible and powerful way to manipulate URLs using an unlimited number of rules. Each rule can have an unlimited number of attached rule conditions, to allow you to rewrite URL based on server variables, environment variables, HTTP headers, or time stamps.

mod_rewrite operates on the full URL path, including the path-info section. A rewrite rule can be invoked in httpd.conf or in .htaccess. The path generated by a rewrite rule can include a query string, or can lead to internal sub-processing, external request redirection, or internal proxy throughput.

Further details, discussion, and examples, are provided in the detailed mod_rewrite documentation.

 

  • sudo a2enmod rewrite
  • sudo systemctl restart apache2
  • sudo nano /etc/apache2/sites-available/000-default.conf

Write this

/etc/apache2/sites-available/000-default.conf
<VirtualHost *:80>
    <Directory /var/www/html>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Require all granted
    </Directory>

    . . .
</VirtualHost>

Comments

  • Neel 913 days ago
    1. sudo systemctl restart apache2

    Now, create an .htaccess file in the web root.

    1. sudo nano /var/www/html/.htaccess

    Add this line at the top of the new file to activate the rewrite engine.

    /var/www/html/.htaccess
    RewriteEngine on
    

    Save the file and exit.