Htaccess weirdness


#1

I tried testing my .htaccess file to see if it was working using the following:

Options +FollowSymLinks
Redirect /google.html http://www.google.com

That being the only thing in my .htaccess file, I get an Internal Server Error.

The error log reports: Illegal option Redirect

However, if I add a comment to the top of .htaccess, like so…

Testing

Options +FollowSymLinks
Redirect /google.html http://www.google.com

…I no longer get the server error. But going to mydomain/google.html yields file not found.

Now I’m not the most proficient htaccesser, but I thought this was a fairly simple test.

Any ideas what I’m missing?


#2

http://www.webweaver.nu/html-tips/web-redirection.shtml

Mhhh… maybe you need the code for the redirect

Redirect 301 /oldpage.html http://www.example.com/newpage.html

Regards.


#3

I tried adding 301, but that wasn’t it.

Does anyone have a suggestion on a simple test to verify that htaccess is working?


#4

Sure! Try this:

deny from allAnd then refresh in your web browser :wink:

:cool: [color=#6600CC]Atropos[/color] | openvein.org


#5

As Atropos7 said, deny from all will show whether .htaccess is working or not.

As for the redirects, they look fine to me, the only difference between my redirects and yours is the lower case ‘r’ in Redirect.

redirect 301 /oldfile.html http://www.domain.tld/newfile.html

Web Hosting Reviews | Get Around The Net Directory


#6

.htaccess is indeed working, but not the redirect or rewriteEngine. I tried making the “r” lowercase to no avail.

Also, I still get an Internal Server Error unless I make the first line a comment, except when I did “deny from all.”

For example, the following produces a 500 error:

Options +FollowSymLinks
redirect 301 /google.html http://www.google.com

However, this works:

Options +FollowSymLinks
redirect 301 /google.html http://www.google.com

(though it doesn’t redirect)

And this works without the comment:

deny from all

Any ideas?