Tagged: .htaccess not working in linux server

.htaccess file Not Working on server with PHP – Fix 0

.htaccess file Not Working on server with PHP – Fix

.htaccess file Not Working on server with PHP – Fix

Today, We want to share with you .htaccess file Not Working on server with PHP – Fix.
In this post we will show you .htaccess file Not Working on server with PHP – Fix, hear for .htaccess file Not Working on server with PHP – Fix we will give you demo and example for implement.
In this post, we will learn about .htaccess file Not Working on server with PHP – Fix with an example.

simple .htaccess is Apache’s and all other server to directory-level steps configuration file. It all the allows end user permistion to configure authentication all the user and admin and other all the options without simple editing main here httpd.conf file.For : htaccess file Not Working on server with PHP – Fix

Common Usage of .htaccess file :

There are the Follwing list of the common usage of .htaccess file.

  • – Authorization, authentication using by .htaccess
  • – Rewriting URLs using by .htaccess
  • – Blocking using by .htaccess
  • – Directory listing using by .htaccess
  • – MIME types using by .htaccess
  • – Cache Control, and many more.

Step : 1 Configure Apache mod_rewrite

     a2enmod rewrite

Step : 2 add the following simple code to /etc/apache2/sites-available/default change

    AllowOverride All

Step : 3 Restart apache

    /etc/init.d/apache2 restart

Common .htaccess Problems

.htaccess needs to be enabled with AllowOverride –

sudo service apache2 restart

The filename is misspelled or does not begin with a “.”

The .htaccess filename is all lowercase.

 htaccess //wrong
 .htaccess //true

Conflicting .htaccess files (2 or more file)

here put only one .htaccess file not put 2 or more file in root dir.

Enabling .htaccess file (not working)

you have to go to here following folders /etc/apache2/
There will be a open this file named apache2.conf
Edit this code

    Options Indexes FollowSymLinks
    AllowOverride All
    Require all granted

Now restart apache.

service apache2 reload

Step 1 : Simple Edit file or creatfile config

/etc/apache2/conf-available/httpd.conf

Add This call

    Options Indexes FollowSymLinks
    AllowOverride All
    Require all granted

simple Enable this config file command run

sudo a2enconf httpd

Restart or reload Apache

sudo service apache2 restart

or other command fire…

sudo service apache2 reload

AccessFileName set to .htaccess

# grep -i AccessFileName httpd.conf

users are allowed to use .htaccess file

# grep -i AllowOverride httpd.conf

AllowOverride ALL

# service httpd restart	

We hope you get an idea about .htaccess file Not Working on server with PHP – Fix
We would like to have feedback on my Information blog .
Your valuable any feedback, Good question, Inspirational Quotes, or Motivational comments about this article are always welcome.
If you liked this post, Please don’t forget to share this as Well as Like FaceBook Page.

We hope This Post can help you…….Good Luck!.