Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 204
  • Last Modified:

get apache to rewrite url call

I would like to know if its possible to get apache to rewrite a call to

www.domain.com/robots.txt (by crawlers) to www.domain.com/ressources.php?res=robots.txt

if so - how would I approach this problem?
0
gunnar2003
Asked:
gunnar2003
  • 2
1 Solution
 
dorwardCommented:
Stick the following in the config file (or .htaccess).

Redirect permanent /robots.txt http://www.domain.com/ressources.php?res=robots.txt
0
 
gunnar2003Author Commented:
wow that was easy. I thought this would require some mod_rewrite magic.

thx
0
 
gunnar2003Author Commented:
if I would use mod_rewrite .. what would be the consequences? which code is returned to a search engine when it calls robots.txt ? a 301 ? is that better then what happens when I use mod_rewrite?

I'd say mod_rewrite cannot be detected...
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now