Problem:
Product's images are not showing
One of the solutions or problem from the Ubercart's forum is Clean URLs is not enable.
Step 1: Clean URLs needs
mod_rewrite
to be enable(Note: mod_rewrite is an Apache 2 module)
Type this command to see all the modules that is currently enable on Apache 2.
/usr/sbin/apache2ctl -M
Look forrewrite_module
this is themod_rewrite
module that clean URL requires.
Step 2: If mod_rewrite is not enable
To enable mod_rewrite module:
sudo /usr/sbin/a2enmod rewrite
You should get this after entering the command:
Enabling module rewrite.
Run '/etc/init.d/apache2 restart' to activate new configuration!
To disable the mod:sudo /usr/sbin/a2dismod rewrite
You should get this after disabling the mod:
Module rewrite disabled.
Run '/etc/init.d/apache2 restart' to activate new configuration!
Remember to restart apache2:
sudo
/etc/init.d/apache2 restart
Step 3: Check your apache2 config file
(I'm an apache2 noob so bare with me)
In the/etc/apache2/sites-enabled
folder I've created a conf file that tells apache2 to host my drupal website.
Here's the general gist of what the config file,/etc/apache2/sistes-enabled/drupal.conf
, have:
What you need to add:
ServerName www.example.com
DocumentRoot /var/www/drupal-6.13
Options FollowSymLinks
AllowOverride None
Order allow,deny
allow from allSo it should look like this:
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
ServerName www.example.com
DocumentRoot /var/www/drupal-6.13
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
Options FollowSymLinks
AllowOverride None
Order allow,deny
allow from all
Remember to restart apache2:sudo
/etc/init.d/apache2 restart
Step 4: Enabling Clean URLS
System: Debian Lenny with Apache2
For information about mod_rewrite:
Apache module mod_rewrite
This post made possible by a mash of information from these websites:
0 comments:
Post a Comment