Forum Moderators: phranque
so I gave the rewrites as follows :
on my second server I have :
LoadModule rewrite_module modules/mod_rewrite.so
RewriteEngine On
RewriteRule ^/appname/(.*)$ [my.first.server.IP...] [R=permanent]
RewriteRule ^/cgi-bin/appname/(.*)$ [my.first.server.IP...] [R=permanent]
Ultimately both my.first.serv.IP and my.second.server.IP both get resolved to my.site.name
Questions :
1. Is the syntax right? Cos its not working :(
2. Do I need to set any permissions for the rewrite to work? If so where?
Pls help .. feelin lost ..
Thanks in advance,
Deepa
Welcome to WebmasterWorld.
Are your rules in the .htaccess or in the httpd.conf file?
If they are in the .htaccess, you will need to remove the preceding / from the left side of your rule.
In the either the httpd.conf or .htaccess file, you will need to have the following setting:
Options +FollowSymLinks
In the httpd.conf file, you will need to have the following setting:
AllowOverride FileInfo
(at least, usually do not recommend setting to all for security reasons, but it will work.)
Please, let us know if this helps, and elaborate on 'does not work'
Justin
thanks for the replies - here are a few more details :
1. my rewrite rules are in my httpd.conf
2. by "not working", I meant - when I try to access [my.second.server.ip...] - it is throwing a 404 instead of resolving to [my.first.server.ip...]
3. when I try the [my.second.server.ip...] - in the apache's error_log I can see this :
script not found or unable to stat : /usr/apache/cgi-bin/appname
4. I have a ScritpAlias entry as well as an AddHandler entry for cgi - in my httpd.conf
Question : is Options +FollowSymLinks alone sufficient? Wil try it out anyways.
Let me know if the extra info helps ..
Thanks you guys,
Deepa
Here's an update after I tried the things u guys suggested:
1. I had the entries
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
which I changed to
<Directory />
Options +FollowSymLinks
AllowOverride FileInfo
</Directory>
and restarted apache - and checked - still throws a 404
2. Gave the full path to mod_rewite as
LoadModule rewrite_module /usr/apache/module/mod_rewrite.so
This also didnt make a diff - still throws 404.
any ideas? Am I doing something wrong in the conf file?
Let me know ..
Thanks,
Deepa