The 410 status code is sent inside the HTTP header that precedes the sending of any visible HTML content.
That 410 header can be generated by mod_rewrite in the .htaccess file, by a few lines of PHP on the server, or in one of several other ways. It matters not how the HTTP status code is generated. The end result looks exactly the same to the browser or bot that made the initial request. The Live HTTP Headers extension for Firefox can show you what is going on.