Forum Moderators: phranque

Message Too Old, No Replies

redirect issue

         

seekstewart

3:09 pm on Apr 18, 2005 (gmt 0)

10+ Year Member



i have configured apache in following manner

RewriteCond /v/trap.com/trigger/offline.html -f
RewriteRule .* /v/trap.com/trigger/offline.html [L]

as soon as finds offline.html it redirects to offline.html

the offline.html internally redirects to www.xyz.com/rahul.cgi

that is [abc.com...] gets redirects to www.xyz.com/rahul.cgi

THIS WORKS FINE

the problem is, as soon as remove the file offline.html and go to the url [abc.com...] it still goes to www.xyz.com/rahul.cgi
i have to manually remove cookies and temporary internet files from IE browser. then only it does not redirect once the file is removed...

How can i get rid of this?

Thanks,
Rahul

seekstewart

3:54 pm on Apr 18, 2005 (gmt 0)

10+ Year Member



may be i should not cache the page: rahul.cgi in the browser (just a guess)

seekstewart

4:06 pm on Apr 18, 2005 (gmt 0)

10+ Year Member



when i open [abc.com...] in new window it does not get redirected but on the same windo i have to delete cookies and temporay file

why?

seekstewart

5:08 pm on Apr 18, 2005 (gmt 0)

10+ Year Member



i tried this:

<META HTTP-EQUIV=\"Pragma\" CONTENT=\"no-cache\">
<META HTTP-EQUIV=\"Expires\" CONTENT=\"-1\">

still the cgi is caching

jdMorgan

5:51 pm on Apr 18, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



See Apache mod_headers and mod_expires.

<FilesMatch "^rahul\.cgi$">
ExpiresActive on
ExpiresDefault A1
Header unset Cache-Control:
Header append Cache-Control: "no-store, no-cache, must-revalidate"
</FilesMatch>

Jim

seekstewart

6:00 pm on Apr 18, 2005 (gmt 0)

10+ Year Member



where do i find:

mod_headers and mod_expires

Thanks,

seekstewart

6:01 pm on Apr 18, 2005 (gmt 0)

10+ Year Member



do i add the following lines:
<FilesMatch "^rahul\.cgi$">
ExpiresActive on
ExpiresDefault A1
Header unset Cache-Control:
Header append Cache-Control: "no-store, no-cache, must-revalidate"
</FilesMatch>

in the same file where my rewrite rules are or somewhere else.

Thanks,

seekstewart

6:16 pm on Apr 18, 2005 (gmt 0)

10+ Year Member



i tried to add those lines in 2 different files:

1) in same file as rewrite rule
2) htttpd.conf file

doesn't works:

get th eerror:
Invalid command 'ExpiresActive', perhaps mis-spelled or defined by a module not included in the server configuration

seekstewart

6:28 pm on Apr 18, 2005 (gmt 0)

10+ Year Member



also when i do:
httpd -l

i get:

Compiled-in modules:
http_core.c
mod_so.c
suexec: disabled; invalid wrapper /l/apache-1.3.28-20031223/bin/suexec

seekstewart

6:35 pm on Apr 18, 2005 (gmt 0)

10+ Year Member



where exactly can i find .htaccess

seekstewart

6:47 pm on Apr 18, 2005 (gmt 0)

10+ Year Member



also based on this: [tutorio.com...]

i guess mod_rewite is enable because i have those thing suncommented in httpd.conf

jdMorgan

2:03 am on Apr 19, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



get the error:
Invalid command 'ExpiresActive', perhaps mis-spelled or defined by a module not included in the server configuration

This says that mod_expires is not included or loaded on your server. You'll need to get it installed.

where exactly can i find .htaccess

You can find it wherever you put it on your server. You may put an .htaccess file in any Web-accessible directory.

Jim