Rewrite a php file to .txt

Discussion in 'Apache' started by subster, Jan 28, 2010.

  1. #1
    Hi there,

    i've a .htaccess file on my server which rewrites the normal urls.
    Now i use a script for googlebase and if call it in the browser it shows me the correct output. How can i rewrite the googlebase.php so that everytime the url http://domain.com/googlebase.php is rewritten to domain.com/googlebase.txt - it cant be so hard, or?

    Any hints?
     
    subster, Jan 28, 2010 IP
  2. hans

    hans Well-Known Member

    Messages:
    2,923
    Likes Received:
    126
    Best Answers:
    1
    Trophy Points:
    173
    #2
    that below should do your job

    Options +Indexes
    Options +FollowSymlinks
    RewriteEngine on
    RewriteBase /
    RewriteRule ^googlebase\.php$ googlebase.txt [L,R=301]
     
    hans, Jan 31, 2010 IP