mod_rewrite

fedora19 trying to do clean install of Omeka 2.04. mod_rewrite error will not allow install.
Have checked all the usual places, settings, etc. mod-rewrite is enabled, .htaccess is fine. localhost name is good etc. permissions, paths, ownership, all good.

Can you point me to where in the omeka code I can disable this thing so I can install?

If Omeka is saying that mod_rewrite is not enabled, then it won't work, even if it installs. Is it possible that the overrides in the apache config file are not allowing overrides in the directory where you have Omeka?

I have same problem. .htaccess file (only one) on root is updated, but getting error that mod_rewrite is not enabled.
Note: Download provided only one .htaccess file. I even tried with downloading older versions - same thing.

Hi,

These are the note I took for fixing my installation:

*** Fix for mod_rewrite not enabled:
- Use the .htaccess file from the new version of omega 2.0.x
- Only use one .htaccess file in the root of /var/www/html/. Remove the other files from /admin and /install

* Look in /etc/httpd/conf/httpd.conf for -->
Set it to "All"

AllowOverride All

*Important entries from the /var/www/html/.htaccess file:
# --------------- #
# Error Reporting #
# --------------- #

# Uncomment the SetEnv line below to turn on detailed on-screen error
# reporting.
#
# Note: This should only be enabled for development or debugging. Keep this
# line commented for production sites.
#
SetEnv APPLICATION_ENV development

# ------------- #
# Rewrite Rules #
# ------------- #

RewriteEngine on

# If you know mod_rewrite is enabled, but you are still getting mod_rewrite
# errors, uncomment the line below and replace "/" with your base directory.
#
# RewriteBase /

# Allow direct access to files (except PHP files)
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule !\.php$ - [C]
RewriteRule .* - [L]

RewriteRule ^install/.*$ install/install.php [L]
RewriteRule ^admin/.*$ admin/index.php [L]
RewriteRule .* index.php

I hope this helps you...

Hi,
This part is a bit unclear. Could someone clarify where .htaccess is supposed to go, and what are the other files which should be removed? Also httpd.conf instructions seem like something is missing.

I've been all thru the mod-rewrite problem and it's still a mess for trying to install Omeka 2.0x.

*** Fix for mod_rewrite not enabled:
- Use the .htaccess file from the new version of omega 2.0.x
- Only use one .htaccess file in the root of /var/www/html/. Remove the other files from /admin and /install

* Look in /etc/httpd/conf/httpd.conf for -->
Set it to "All"

AllowOverride All

There should just be one .htaccess file, in the top-level Omeka directory. This is how the Omeka 2 zip is packaged, so if this is a clean install, there should be no extra .htaccess files floating around.

What does "it's still a mess" mean? Are you still having a mod_rewrite problem, or some other problem?

on fedora my webserver directory is /var/www/html.
In /html I have various webs, ex. /var/www/html/omeka, /var/www/html/joomla, /var/www.html/omeka2, /var/www.html/omekaBeta, etc. Those then result in a URL which looks like: http://localhost/omeka, or better http://xxxmyIPaddressxxxx/omeka.

Are you writing then that it should be /var/www/html/.htaccess?

Each web may have its own .htaccess and with multiple webs or sites on a sever, this approach of one .htaccess doesn't seem quite right.

The .htaccess file for Omeka should be exactly where it was in the zip file structure.

In the structure you've described, it would be at /var/www/html/omeka/.htaccess

I'm running Ubuntu 12.04, not Fedora. Trying to move OMEKA v 1.5.3 other machine, I had same problem. In my case the problem was not related with .htacess, but with the directive AllowOverride applied to the document root of Apache server.
Look for /etc/httpd/conf/httpd.conf, edit the file; find the directive impending on your document root, something along the lines (remember, I'm using Ubuntu, yours could be different):

<Directory /var/www/html>
Options Indexes FollowSymLinks Multiviews
AllowOverride None
Order allow,deny
allow from all
</Directory>

The important part is AllowOverride None. Try to change the 'None' to 'All', save the file and don't forget to restart apache.

Hope to have helped...

Hi,
Thanks for that info.
Yes, I have exactly that in my httpd.conf, but get:

Apache's mod_rewrite extension must be enabled for Omeka to work properly. Please enable mod_rewrite and try again.

I know mod_rewrite is enabled. Just can't install Omeka.

Sometimes httpd.conf includes instructions for different directories. Double check that there aren't any other directories with different permission setting listed in httpd.conf

Hi,
Thank you for the update.
My attempt to install Omeka 2.4 is located in:
/var/www/html/omeka24

If I'm following what you're saying, then in /etc/httpd/conf/httpd.conf what I did was this:

...
<Directory />
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
allow from all
</Directory>

DocumentRoot "/var/www/html"

<Directory "/var/www">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
allow from all
</Directory>

<Directory "/var/www/html">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
allow from all
</Directory>
...

I have verified .htacess is located in /var/www/html/omeka24.

I also followed instructions below for how to test modrewrite is working, and verified it is working from the omeka24 folder.

http://www.webune.com/forums/how-to-test-check-if-mod-rewrite-is-enabled-t40.html

I am restarting apache after making changes to httpd.conf, and I have double checked all file and folder permissions and ownerships.

...still no joy installing omeka.

Regards,
Jim

You can force Omeka to skip the rewrite check by going to install/install.php

But, if all the mod_rewrite stuff and the .htaccess file are set up correctly and sitting in the right places, it should already be working. Manually skipping the check will let you install, but you could run into rewrite problems when you go to actually use Omeka.

Hi,
Thank you for the additional information. I gave up on the mod rewrite approach since apparently all was well there. I tried going around the problem and got further by changing the .htaccess file to allow direct access to the .php files (I think that's what it's doing (RewriteRule \.php$ - [c] instead of RewriteRule !\.php$ - [C], and it finally let me install.

# Allow direct access to files (except PHP files)
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule \.php$ - [C]
RewriteRule .* - [L]

RewriteRule ^install/.*$ install/install.php [L]
RewriteRule ^admin/.*$ admin/index.php [L]
RewriteRule .* index.php

Regards,
Jim