Cron Job,Rewrite Rule

Status
Not open for further replies.

kmarkiv

New Member
Messages
27
Reaction score
0
Points
0
Dear SIr ,
The cron i setup on the server is not working ..It is a php script, Also Sir .. the Mod_rewrite is not working in one directory to a cgi Script (index to index.cgi)
 

lemon-tree

x10 Minion
Community Support
Messages
1,420
Reaction score
46
Points
48
It would help us tremendously if you could provide the command entering in cPanel for the cron job and the contents of the .htaccess file.
 

kmarkiv

New Member
Messages
27
Reaction score
0
Points
0
Sorry for the delayed reply ..

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.cgi -f
RewriteRule ^(.*)$ $1.cgi

is the code for apache rewrite to hide .cgi extension

the cron job php code is php /home/kmarkiv/***/***.php
 

Anna

I am just me
Staff member
Messages
11,750
Reaction score
581
Points
113
Sorry for the delayed reply ..

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.cgi -f
RewriteRule ^(.*)$ $1.cgi

is the code for apache rewrite to hide .cgi extension

the cron job php code is php /home/kmarkiv/***/***.php

Try adding RewriteBase / to your .htaccess
 

dlukin

New Member
Messages
427
Reaction score
25
Points
0
Code:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.cgi -f
RewriteRule ^(.*)$ $1.cgi

Exactly what is this supposed to do? Be precise, please.

And how are you testing it? What are the results of the test?
 

kmarkiv

New Member
Messages
27
Reaction score
0
Points
0
i don't think its the problem with my code .. they worked fine for a long time until recently after the update they stopped working

through rewrite i want to hide the extension of a cgi file
e.g. website.com/forms/form
must redirect to website.com/forms/form.cgi
btw
does not wrk with adding
RewriteBase /

and cron with adding /usr/bin/php
Thanks a lot
 
Last edited:
Status
Not open for further replies.
Top