Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 207
  • 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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

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