How to enable mod rewrite in openSUSE 10.3

I need to enable mod rewrite in openSUSE 10.3 to install CAKEPHP. So, far I have tried this
add rewrite to /etc/sysconfig/apache
Allow rewrite in Apache httpd.conf file.

Now when I check server with phpinfo() it says modrewrite is enabled but when I go to
it say object not found.
Now if I put cake folder inside www folder with a root privilege and browse to http://lcalhost/cake it gives me page without cake php mod enabled. You know without any color.

Any help will be greatly appreciated
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

apache enable mod_rewrite or a2enmod mod_rewrite...

also have you restarted apache?

is the .htaccess file in the root directory?

did you change the user permissions on the files?
nicholasnetAuthor Commented:
Well I did all that but it still shows page with mod rewrite disabled.
can you post the .htaccess file?
This can be done through the YaST administration Tool.

Click your Start Button in the GUI go to the menu 'System' and open up YaST
YaST -> Network Services -> HTTP Server
      - Go to the 'Server Modules' tab
      - Find 'rewrite' and toggle status
      - Click Finish to apply
YaST -> Network Services -> HTTP Server
      - Go to the 'Server Modules' tab
      - Find 'rewrite' and toggle status
      - Click Finish to apply

Or instead of the above option add one of the following entry depending on your architecure "/etc/apache2/sysconfig.d/loadmodule.conf"

LoadModule rewrite_module                 /usr/lib64/apache2-prefork/
LoadModule rewrite_module                 /usr/lib32/apache2-prefork/

Now I think your primary issue is your not allowing .htaccess files to be used (This was my problem after applying the YaST solution above). The following procedure will enable that for you.

In the /etc/apache2/httpd.conf file reflect the following:

# forbid access to the entire filesystem by default
<Directory />
    Options All
    AllowOverride All
    Order deny,allow
    Allow from all

# use .htaccess files for overriding,
AccessFileName .htaccess
# and never show them
<Files ~ "^\.ht">
    Order allow,deny
    Allow from all

Open the /etc/apache2/default-server.conf file and find the <Directory "/srv/www/htdocs"> portion

Set  "Options All" and "AllowOverride All" and "Allow from all"

Restart the apache web server
/etc/init.d/apache2 stop
/etc/init.d/apache2 start

You should now be running with mod_rewrite. I just tested this on a brand new install of SuSE10.3 myself.

To test this create a .htaccess file and place it in your webroot
Options +followsymlinks
RewriteEngine on
RewriteRule ^fake\.html$ /index.html [L]

Now make sure you have an index.html file in your webroot.
Visit your website using fake.html and it will take you to index.html

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Apache Web Server

From novice to tech pro — start learning today.