You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Jeremy Sellors nwt <jk...@northwestel.net> on 2006/09/19 12:36:05 UTC

[users@httpd] Mod_rewrite rule for renamed FastCGI scripts

Hi,
I have changed a script name suffix from .cgi to .fcgi to enable the  
script to run under FastCGI
The script works to bring up the initial login form but when I fill  
the form out and press submit I get a "Not Found The requested URL / 
mtw/mt.cgi was not found on this server." using the old file suffix.
Is there a way to use mod_rewrite to fix this?
I have tried:
RewriteEngine On
RewriteRule ^mt.fcgi(.) mt.fcgi$1 [L]
in the .htaccess file but this does not work.

Thanks,
Jeremy Sellors


Re: [users@httpd] Mod_rewrite rule for renamed FastCGI scripts

Posted by Jeremy Sellors nwt <jk...@northwestel.net>.
Thanks for your help. The htaccess file seems to work well. Referring  
back to the the mod_rewrite documentation and URL Rewriting Guide  
makes more sense now.

Jeremy Sellors


On Sep 19, 2006, at 5:53 AM, Eric Covener wrote:

> On 9/19/06, Jeremy Sellors nwt <jk...@northwestel.net> wrote:
>>
>> I have changed a script name suffix from .cgi to
>>  .fcgi to enable the script to run under FastCGI
>> RewriteEngine On
>> RewriteRule ^mt.fcgi(.) mt.fcgi$1 [L]
>                                   ^      ^
>> in the .htaccess file but this does not work.
>
> I put carets under the two things that probably prevent your rule from
> even matching, if I understand correctly.
>
> Try setting RewriteBase in that htaccess file, and also reconsider
> your RewriteRule.  I'd think it'd be more of the form
>
> RewriteBase /mtw/
> RewriteRule ^mt.cgi$ mt.fcgi [PT]
>
> (Or look at the action parameter of the login form)
>
>
>
>
> -- 
> Eric Covener
> covener@gmail.com
>
> ---------------------------------------------------------------------
> 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
>

Jeremy Sellors
jksellors@northwestel.net

"I'm addicted to placebos. I could quit but it wouldn't matter."
   (Steve Wright)




Re: [users@httpd] Mod_rewrite rule for renamed FastCGI scripts

Posted by Eric Covener <co...@gmail.com>.
On 9/19/06, Jeremy Sellors nwt <jk...@northwestel.net> wrote:
>
> I have changed a script name suffix from .cgi to
>  .fcgi to enable the script to run under FastCGI
> RewriteEngine On
> RewriteRule ^mt.fcgi(.) mt.fcgi$1 [L]
                                   ^      ^
> in the .htaccess file but this does not work.

I put carets under the two things that probably prevent your rule from
even matching, if I understand correctly.

Try setting RewriteBase in that htaccess file, and also reconsider
your RewriteRule.  I'd think it'd be more of the form

RewriteBase /mtw/
RewriteRule ^mt.cgi$ mt.fcgi [PT]

(Or look at the action parameter of the login form)




-- 
Eric Covener
covener@gmail.com

---------------------------------------------------------------------
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