收录日期:2019/03/26 02:58:12 时间:2009-07-29 18:07:26 标签:.htaccess,mod-rewrite,freebsd

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

You should take a look at AllowOverride it is probably turned off try something like this:

<Directory /path/to/www/root/>
AllowOverride All
</Directory>