FreeBSD Server .htaccess issues

.htaccessfreebsdmod-rewrite

Server Details:

FreeBSD
PHP Version 4.3.11
Apache

Appache Modules:

mod_throttle, mod_php4, mod_speedycgi, mod_ssl, mod_setenvif, mod_so, mod_unique_id, mod_headers, mod_expires, mod_auth_db, mod_auth_anon, mod_auth, mod_access, mod_rewrite, mod_alias, mod_actions, mod_cgi, mod_dir, mod_autoindex, mod_include, mod_info, mod_status, mod_negotiation, mod_mime, mod_mime_magic, mod_log_config, mod_define, mod_env, mod_vhost_alias, mod_mmap_static, http_core

The issue I am having is when ever I write any kind of code in the .htaccess file, it throws a 500 Internal error

I am simply trying to rewrite url's and am using the exact code that wordpress creates for me and even tried custom code used before on previous servers and it still does not work.

WordPress created code:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /lobster-tail-blog/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /lobster-tail-blog/index.php [L]
</IfModule>

# END WordPress

And even a simple thing like this throws the error:

<IfModule mod_rewrite.c>
    RewriteEngine On
</IfModule>

Anyone know of any fixes or why this is causing this error? I have the mod_rewrite module loaded

Best Answer

Off the top of my head, .htaccess doesn't need the bits. Your .htaccess should be OK with just

RewriteEngine On
RewriteBase /lobster-tail-blog/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /lobster-tail-blog/index.php [L]

In it. Failing that, what gets written to your httpd-error.log?

Related Topic