httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yoom Nguyen <y...@hostwebase.com>
Subject Re: [users@httpd] redirect issue
Date Sat, 11 Oct 2008 16:36:59 GMT
Justin and all
 
It doesn't work for me.  I am not quite sure what the problem is.  Here is the error again.


# apache2ctl restart

Syntax error on line 25 of /etc/apache2/vhosts.d/corp-yast2_vhost.conf:
Redirect takes two or three arguments, an optional status, then document to be redirected
and destination URL
httpd not running, trying to start


THIS IS WHAT I HAVE
> RewriteEngine on
> RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
> RewriteRule .* -[F]
>
> RedirectMatch Permanent ^/$ http://corp.test.com/Pub/portal/desktop
> Redirect Permanent /groupMaterials/MPSERS_plan.pdf http://corp.test.com/Pub/Grials/MPSERS_Plan.pdf
> Redirect Permanent /Vis/dvDnal.pdf http://corp.test.com/Pub.pdf
>



Thanks again.

Y






----- Original Message -----
From: "Yoom Nguyen" <yoom@hostwebase.com>
To: users@httpd.apache.org
Sent: Thursday, October 9, 2008 8:54:15 AM (GMT-0500) America/New_York
Subject: Re: [users@httpd] redirect issue

Justin,


Thank you so much for look into my issue.  Yes, I got an error when I try to restart apache.
This is what it said.

"Syntax error on line 25 of /etc/apache2/vhosts.d/vipcorpinuat-yast2_vhost.conf:
Redirect takes two or three arguments, an optional status, then document to be redirected
and destination URL"


I created the redirect list via notepad, cut and paste over to vi editor under Linux console.


I though I need something different with the RewriteCond.


I will check those line again, but I was sure there are no extra space or control characters.



Thanks again,

Y







----- Original Message -----
From: "Justin Pasher" <justinp@newmediagateway.com>
To: users@httpd.apache.org
Sent: Thursday, October 9, 2008 5:00:12 PM (GMT-0500) America/New_York
Subject: Re: [users@httpd] redirect issue

Yoom Nguyen wrote:
> Greetings,
>
> Could some one tell me what is the correct Redirect syntax and RewriteCond to get the
following
> requirements to work?   
>
>
> This is what I currently have and it complaining.
> I am running SuSe 10.
>
>
> RewriteEngine on
> RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
> RewriteRule .* -[F]
>
> RedirectMatch Permanent ^/$ http://corp.test.com/Pub/portal/desktop
> Redirect Permanent /groupMaterials/MPSERS_plan.pdf http://corp.test.com/Pub/Grials/MPSERS_Plan.pdf
> Redirect Permanent /Vis/dvDnal.pdf http://corp.test.com/Pub.pdf
> Redirect Permanent /about http://corp.test.com/PublicWeb/appr/portal/desktop?_nfpb=true&_page=bADD_pHome
>
>
>
> Complain Error when I restart apache2***
>
> Syntax error on line 25 of /etc/apache2/vhosts.d/corp-yast2_vhost.conf:
> Redirect takes two or three arguments, an optional status, then document to be redirected
and destination URL
>
>
> The line 25 is the second redirect line.  This line
> Redirect Permanent /groupMaterials/MPSERS_plan.pdf http://corp.test.com/Pub/Grials/MPSERS_Plan.pdf
>
>
>
> Thank you in advance for assist in this issue
>
> Y
>   

Are you sure the file with these directives is what apache is 
complaining about? The directives themselves look fine to me, and I 
copied them verbatim to my server and it doesn't complain. Perhaps the 
file itself is corrupted (something like Windows CRLF line endings 
instead of UNIX LF)?


-- 
Justin Pasher

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message