Koozali.org formerly Contribs.org

.htaccess and mod_rewrite giving error

Brad D.

.htaccess and mod_rewrite giving error
« on: February 04, 2004, 04:25:15 AM »
Hello Everyone!

I am tring to get Apache mod_rewrite to be enabled, as I am learning with some tutorials.

After searching the forums here, I found a contrib to install .htaccess support for my SME 6.0 server.
(http://mirror.contribs.org/smeserver/contribs/star/mitel/contrib/htaccess/)

After installing the contrib, I placed this text in my .htaccess file, as stated in my tutorial:
Code: [Select]
Line 1) RewriteEngine On
Line 2) RewriteRule !\.(gif|jpg|png|css)$ /home/e-smith/files/ibays/Primary/html/index.php


When I point Konqueror Web Browser or IE6 to http://192.168.0.1/ I get this error:
Quote
Forbidden
You don't have permission to access / on this server.


Even if my .htaccess file line 1 has "RewriteEngine off" I still get the same error. But if I remove lines 1 and 2 then I do not get any errors.


Does anyone know how to enable mod_rewrite access?

Thanks,
Brad D.

knut

.htaccess and mod_rewrite giving error
« Reply #1 on: February 10, 2004, 11:16:54 AM »
I get the exact same error.
It's the line  "RewriteEngine On" that causes the problem.
I have tried searching the forums for this problem, but havent found any solution :-)

Regards
Knut

brad

.htaccess and mod_rewrite giving error
« Reply #2 on: February 18, 2004, 07:32:26 PM »
knut,

I have done some more investigating on google,
and I found this:

In a php file run this code:
Code: [Select]
<?php php_info&#40;&#41;; ?>

It tells me I  have "mod_rewrite" properly installed.

Also found this howto for mod_rewrite http://www.fluidthoughts.com/howto/mod_rewrite/

Can anyone shed some light? Or should I move this to the BUGS forums?

Thanks, Brad D.

brad

.htaccess and mod_rewrite giving error
« Reply #3 on: February 19, 2004, 03:34:27 AM »
I got it! The answer is in the tutorial!!!

Try this in your .htaccess file, as we were only trying the first line of the code.
 
Code: [Select]
RewriteEngine on
Options +FollowSymlinks
RewriteBase /


Also don't forget read about this on the Apache website. The answer is there too.

BTW I am running SME 6.0 final.

--Good luck, Brad D.