LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   "Options +FollowSymlinks" not working on my server (https://www.linuxquestions.org/questions/linux-server-73/options-followsymlinks-not-working-on-my-server-653977/)

steve51184 07-06-2008 09:55 PM

"Options +FollowSymlinks" not working on my server
 
been trying to add something to my .htaccess file that uses "Options +FollowSymlinks" but whenever i add that line i get a "500 Internal Server Error" error message

ubuntu 7.1, apache2

bathory 07-07-2008 01:55 AM

You could take a look at the apache error_log to see if you find out what the problem is.
Check if you have "AllowOverride All" or at least ""AllowOverride Options" in httpd.conf or in the .htaccess

steve51184 07-07-2008 02:01 AM

that didn't seem to work :\

bathory 07-07-2008 02:37 AM

Quote:

that didn't seem to work :\
Could you give some details? Post at least the .htaccess and the entry in the error_log

steve51184 07-07-2008 01:05 PM

Code:

Options +FollowSymlinks
RewriteEngine on
RewriteCond %{REMOTE_HOST} 22\.22\.22\.22
RewriteRule \.php$ http://website.com [R=301,L]

and the error log has:

Code:

[Mon Jul 07 19:05:40 2008] [error] an unknown filter was not added: PHP
[Mon Jul 07 19:05:40 2008] [error] an unknown filter was not added: PHP
[Mon Jul 07 19:05:40 2008] [error] [client 127.0.0.1] File does not exist: /htdo                                            cs
[Mon Jul 07 19:05:40 2008] [error] an unknown filter was not added: PHP
[Mon Jul 07 19:05:40 2008] [error] an unknown filter was not added: PHP
[Mon Jul 07 19:05:40 2008] [error] an unknown filter was not added: PHP
[Mon Jul 07 19:05:40 2008] [error] an unknown filter was not added: PHP
[Mon Jul 07 19:05:41 2008] [error] an unknown filter was not added: PHP
[Mon Jul 07 19:05:41 2008] [error] an unknown filter was not added: PHP
[Mon Jul 07 19:05:51 2008] [error] [client 127.0.0.1] File does not exist: /htdo                                            cs
[Mon Jul 07 19:05:57 2008] [error] [client 127.0.0.1] File does not exist: /htdo                                            cs
[Mon Jul 07 19:05:58 2008] [error] [client 127.0.0.1] File does not exist: /htdo                                            cs
[Mon Jul 07 19:05:59 2008] [error] [client 127.0.0.1] File does not exist: /htdo                                            cs
[Mon Jul 07 19:06:00 2008] [error] [client 127.0.0.1] File does not exist: /htdo                                            cs
[Mon Jul 07 19:06:01 2008] [error] [client 127.0.0.1] File does not exist: /htdo                                            cs
[Mon Jul 07 19:06:02 2008] [error] [client 127.0.0.1] File does not exist: /htdo                                            cs
[Mon Jul 07 19:06:06 2008] [error] an unknown filter was not added: PHP
[Mon Jul 07 19:06:06 2008] [error] an unknown filter was not added: PHP
[Mon Jul 07 19:06:07 2008] [error] an unknown filter was not added: PHP
[Mon Jul 07 19:06:07 2008] [error] an unknown filter was not added: PHP


bathory 07-08-2008 02:59 AM

There are a couple of errors in the logs, but none of them results in a 500 Internal Server Error. Make sure you have at least "AllowOverride Options" in the <Directory /path/to/htdocs> part of httpd.conf.
As for the errors, just some things to look into:
Quote:

[Mon Jul 07 19:05:40 2008] [error] an unknown filter was not added: PHP
To get rid of this error read this
Quote:

Mon Jul 07 19:05:40 2008] [error] [client 127.0.0.1] File does not exist: /htdo cs
I guess this is because of the rewrite rule. I don't know what you're trying to do and I'm not very familiar with mod_rewrite, so I can only make some suggestions to your rewrite based on the apache mod_rewrite manual.
1. RewriteCond %{REMOTE_HOST} 22\.22\.22\.22 should be RewriteCond %{REMOTE_ADDR} ^22\.22\.22\.22$
2. For RewriteRule \.php$ http://website.com [R=301,L] try: RewriteRule .*\.php$ http://website.com [R=301,L]


All times are GMT -5. The time now is 03:43 PM.