Remove Index.php From URL |
X

Congrats, You are Subscribed to Receive Updates.

Remove Index.php From URL


Introduction

Remove Index.php From URL. Sometimes your website requires to keep use of index.php for indexing the pages. This is not necessary for our url and it looks ugly to see all of our site urls.  So we need to remove it from the url. By enabling the mod_rewrite it will be solved. To enable it the rewrite module, run “apache2 enable module rewrite”:

sudo a2enmod rewrite

Once you update the configurations or settings.  You need to restart the webserver to apply the changes:

sudo service apache2 restart

If you plan on using mod_rewrite in .htaccess files, you also need to enable the use of .htaccess files by changing AllowOverride None to AllowOverride FileInfo.

Remove-Index

For the default website, edit /etc/apache2/sites-available/default: or /etc/apache2/sites-available/apache2.conf .

Configuration

    <Directory /var/www/>
            Options Indexes FollowSymLinks MultiViews
            # changed from None to FileInfo
            AllowOverride FileInfo
            Order allow,deny
            allow from all
    </Directory>

After making changes you need to save and, you need to restart Apache again.

Saving does not work sometimes, if you have the access permission problems.  Let’s change the permission before saving it.

sudo chmod 777 /etc/apache2/sites-available/default/000-default.conf

Than you can rewrite your .htaccess file to take effect in it. If you are interested to know more tutorials and tips from me. Just follow and subscribe my channel to get more updates.  Don’t worry I don’t spam your inbox. You can select appropriate category to receive emails from that particular articles.  Also if you are interested you can follow me on different social sites. follow me with bellow listed sites.

commenter

About Varadharaj V

The founder of Kvcodes, Varadharaj V is an ERP Analyst and a Web developer specializing in WordPress(WP), WP Theme development, WP Plugin development, Frontaccounting(FA), Sales, Purchases, Inventory, Ledgers, Payroll & HRM, CRM, FA Core Customization, PHP and Data Analyst. Database Management Advance Level

Comment Below

Your email address will not be published. Required fields are marked *

*

Current ye@r *

Menu

Sidebar