AlegroCart open source E-commerce
Web hosting by Host1Plus

Howto test .htaccess

knowledge base and frequently asked questions

Howto test .htaccess

Postby leo » Wed May 23, 2012 6:51 am

How to test that the content of the .htaccess file is taken into consideration by your apache2 web server?
Open your .htaccess file and write into the last line the word test.
So, original .htaccess:
Code: Select all
.
.
</IfModule>
# Try if you have problems with url alias
# RewriteRule ^(.*) index.php [L,QSA]

# Focus on one domain - Uncomment to use
# RewriteCond %{HTTP_HOST} !^www\.example\.com$ [NC]
# RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L]

After modification:
Code: Select all
.
.
</IfModule>
# Try if you have problems with url alias
# RewriteRule ^(.*) index.php [L,QSA]

# Focus on one domain - Uncomment to use
# RewriteCond %{HTTP_HOST} !^www\.example\.com$ [NC]
# RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L]
test

Save it, then refresh your shop in your browser.
If you get this error:
Code: Select all
Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

everything works fine.
If not - and you are on production server - ask you web service provider to enable .htaccess files.
User avatar
leo
admin
 
Posts: 4191
Joined: Sun Dec 13, 2009 8:27 am
Location: Hungary

Return to FAQ / Layouts / Knowledge Base

Who is online

Users browsing this forum: No registered users and 1 guest

cron