当尝试重写链接时,重写mod给内部服务器错误

有很多问题讨论重写我遇到的mod问题,没有解决我的独特问题,我已经做了3个小时的研究解决它,仍然卡住了。

我想通过文件获取内容php函数来重写从远程站点检索到的源代码中的链接,

当我得到的源代码的链接结构是

<a href='javascript:openWindow("index1.php?option=com_lsh&view=lsh&event_id=148730&tv_id=850&tid=34143&channel=0&tmpl=component&layout=popup&Itemid=335","735","770")' >Link#1</a> 

我想重写

 <a href='javascript:openWindow("http://remotesite.com/index1.php?option=com_lsh&view=lsh&event_id=148730&tv_id=850&tid=34143&channel=0&tmpl=component&layout=popup&Itemid=335","735","770")' >Link#1</a> 

经过研究,我认为rewite国防部将做的伎俩,并试图把下面的代码在我的htaccess文件

 Options +FollowSymLinks RewriteEngine On RewriteBase / RewriteRule ^index1\.php?option - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule http://remotesite/index1.php?option [L] 

但它给我内部服务器错误我在这里做错了吗? 有没有其他的方法来重写上面描述的方式的链接结构?

你不能重写DOM对象,Apache的mod_rewrite重写请求,而不是DOM。 为你实现任何你想要做的正确的地方是在你的PHP脚本获取文件内容。