Suse 9.1 Pro & htaccess file: mod_rewrite not loading
SUSE / openSUSEThis Forum is for the discussion of Suse Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Suse 9.1 Pro & htaccess file: mod_rewrite not loading
Has anyone encountered this problem?
I'd really like to post the whole situation, but I keep getting a message that I should remove the URLs, despite there not being any URLs in the message, and having re-written the message 4 times to (even) substitute "(slash)" for "/" in the directory that I was quoting.
I've tried "RewriteEngine On" in httpd.conf, in my vhosts.conf file, and (of course) in the .htaccess file. I was doing fine with Suse 9.1 Pro and Mambo/phpBB, etc., until I thought I would tighten up access and reduce spambot pillaging, after reading the security thread at the Mambo forums (security section).
Without the .htacess file in /srv/www/mambo (the install dir for v4.5.1a Mambo that I used), everything is hunky-dory.
The problem comes when I create a .htaccess file in that directory ... Apache 2 throws a 500 error of "Invalid command 'RewriteEngine' "(in the /srv/www/.htaccess file). It's a dedicated, "under-my-control" server sitting beside me in my home, and I'm using http://localhost to access Mambo and phpBB (in the .../mambo/forum directory), BTW, quite successfully without the .htaccess file present in .../mambo.
I checked through Yast and it says Apache 2 provides mod_rewrite and, sure enough, mod_rewrite.so is in the /usr/lib/apache2-prefork library along with all the other .so modules that are loaded in the /etc/Apache2/sysconfigd/loadmodule.conf file.
But there's not an explicit loadmodule line for mod_rewrite.so in that .conf file. So I inserted:
LoadModule rewrite_module /usr/lib/apache2-prefork/mod_rewrite.so
both ahead of, and behind, the:
LoadModule php4_module /usr/lib/apache2-prefork/libphp4.so line
(obviously not at the same time, but on different tests).
Neither works. Apache 2, in both instances, comes up nicely but discards the inserted LoadModule line for mod_rewrite.so, since the .conf file doesn't contain it after Apache is stopped and restarted.
So if SUSE's Apache 2 is providing mod_rewrite, and it won't stay in the LoadModule.conf file, my conclusion (probably false) is that it's already loaded as a module. But if I use the old standby utility ab_info.php, mod_rewrite doesn't show up as loaded (nor in SysInfo in the Mambo Admin Panel).
At any rate, I'm unable to use mod_rewrite and .htaccess files, and I'd really like to.
Anyone encountered this, or have an insight into what's wrong? The only other conclusion I can draw is that Yast/SUSE are telling falsehoods! So if I regen, there's probably no chance that I'll end up with anything different than I have now.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.