2

The clean URL test failed. It was working correctly on my local computer, when I uploaded it to server I got this message and I could not enable the clean url. What should I do to enable it? I have uploaded the htaccess also.

Varada
  • 16,026
  • 13
  • 48
  • 69
  • Check if the .htaccess file is considered at least -- add some random text to .htaccess and you should get a 500 Internal Server Error page. If so, that means your .htaccess file is executed by server. – AKS Oct 06 '12 at 10:54

3 Answers3

2

There are a number of requirements you'll need to confirm are met on the server. After confirming Apache is allowing your local .htaccess configuration override (as per Ayesh's comment) I'd start by checking info.php to see if mod_rewrite is loaded.

Make sure you remove info.php when you're done checking as you should not have this on a production server.

Forest
  • 808
  • 6
  • 9
2

have a look at Configure clean URLs, suppose you are using apache2

  1. enabled mod-rewrite in apache

    sudo a2enmod rewrite

  2. vi /etc/apache2/sites-enabled/000-default, change AllowOverride from None to All

<Directory /var/www/>
   Options Indexes FollowSymLinks MultiViews
   AllowOverride All
   Order allow,deny
   allow from all
</Directory>
  1. vi httpd.conf, add this
<Directory /var/www/>
      RewriteEngine on
      RewriteBase /
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteCond %{REQUEST_FILENAME} !-d
      RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
</Directory>

2. restart apache

sudo service apache2 restart
hahakubile
  • 6,978
  • 4
  • 28
  • 18
0

If your entire site is password protected (via cpanel/.htaccess) Then the test will not pass. This may not be the solution but is worth checking.

I disabled password protection by commenting out the following lines in my .htaccess file.

AuthType Basic
AuthName "public_html"
AuthUserFile "/home/********/.htpasswds/public_html/passwd"
require valid-user

Run the test again, if it passes, tick the box then be sure to uncomment the previously commented lines.

Tomeh
  • 301
  • 4
  • 14