agubaira
asked on
Redirecting with Apache
Hi,
My question is simple: How can I redirect visitors from www.mywebsite.com to www.mywebsite.com/cgi-bin/script.cgi, using Apache ?
Thanks
My question is simple: How can I redirect visitors from www.mywebsite.com to www.mywebsite.com/cgi-bin/script.cgi, using Apache ?
Thanks
ASKER
Is there a way to do it with "Redirect" instead ? I don't understand the rule, how would it be in my case ?
Thanks
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
It worked beautifully ! Thanks dude.
I would suggest using mod_rewrite check it out:
http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html
heres a little demo code:
#
# /abc/def/.htaccess -- per-dir config file for directory /abc/def
# Remember: /abc/def is the physical path of /xyz, i.e., the server
# has a 'Alias /xyz /abc/def' directive e.g.
#
RewriteEngine On
# let the server know that we were reached via /xyz and not
# via the physical path prefix /abc/def
RewriteBase /xyz
# now the rewriting rules
RewriteRule ^oldstuff\.html$ newstuff.html