Jump to content

Mod_Rewrite fails - SUSE 10.1


windyweather

Recommended Posts

I'm trying to get WordPress to work on Apache on SUSE 10.1. It looks like a problem with Mod_Rewrite.
I don't suspect a problem with Apache, but a problem with the config on SUSE.
But to reduce the problem to more manageable test case, I tried the following:

YAST shows REWRITE enabled.
I've restarted the server, and rebooted.

Apparently mod_rewrite is not enabled. Wordpress doesn't work with permalinks and a simple test doesn't work either.
Any tricky business that I need to know? Any suggestion for a simple test? One test I saw suggested that I would get an error on [b]RewriteEngine On[/b] if the module were not loaded. But apparently that is not the case.

Pretty much no URL is handled. For the test case below:
[url=http://localhost/test-rewrite/content.php]http://localhost/test-rewrite/content.php[/url] works as well as ... /content.php?whatever=somevalue
but
[url=http://localhost/test-rewrite/products/]http://localhost/test-rewrite/products/[/url]  gives a 404 as does
[url=http://localhost/test-rewrite/products/1123123/]http://localhost/test-rewrite/products/1123123/[/url]

I've just tried to build a simple example since wordpress is not exactly straightforward to diagnose.
So it looks like mod_rewrite is not enabled, even tho YAST says so.

[url=http://www.windyweather.net/wp/2006/08/02/apache-configuration/]Here's an archive of the entire apache config tree.[/url]

Thanks,
ww

.htaccess
[code]
Options +FollowSymLinks
AllowOverride All
RewriteEngine On

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /test-rewrite/
#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^/products$ /test-rewrite/content.php?action=product_list [NC]
RewriteRule ^/products/([0-9]+)$ /test-rewrite/content.php?code=$1 [NC]
RewriteRule . /test-rewrite/content.php [L]
</IfModule>
[/code]

content.php
[code]
<html xmlns="http://www.w3.org/1999/xhtml">

<head profile="http://gmpg.org/xfn/11">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

<title>Test MOD_REWRITE</title>

</head>
<body>

<h2>Parameter List</h2>
<?php

foreach ( $_GET as $key => $value )
{
print( "$key = $value<br>" );
}

?>

</body>
</html>
[/code]
Link to comment
Share on other sites

  • 4 months later...
Windy, I'm coming up against the same deal.  I have SUSE 10 and YaST says it's enabled, but even the simplest rewrite function doesn't work.

I have AllowOverride All and Options FollowSymLinks enabled in <directory>.

I've actually got a thread going on another site: http://forums.devnetwork.net/viewtopic.php?p=362883

If you could help that would be great.
Link to comment
Share on other sites

Bill_VA,

I'm no expert.. I solved my problem by doing (1) and (2) above...
I suggest you carefully compare the config that I posted as an archive - follow above link - with yours, and then make the (1) and (2) changes.
Sorry, but I don't have any more to add.

Good luck.
ww
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.