Amazon web services 向AWS lightsail中的htaccess文件添加子域

Amazon web services 向AWS lightsail中的htaccess文件添加子域,amazon-web-services,.htaccess,mod-rewrite,lamp,amazon-lightsail,Amazon Web Services,.htaccess,Mod Rewrite,Lamp,Amazon Lightsail,我正在使用AWS Lightsail LAMP实例来托管该站点。 我想给它添加子域。在搜索了很多之后,我自己无法修复它,需要一些帮助 详细信息: 根域-->英语-https://www.example.site/ 我想添加其他语言作为子域 子域-法语-https://fr.example.site/ 子域-德语-https://de.example.site/ 我已完成vhost配置,apache2服务器正在从和成功地为测试页面提供服务 但是,当我使用htaccess部署实际应用程序时,根域工作

我正在使用AWS Lightsail LAMP实例来托管该站点。 我想给它添加子域。在搜索了很多之后,我自己无法修复它,需要一些帮助

详细信息:

根域-->英语-https://www.example.site/

我想添加其他语言作为子域

子域-法语-https://fr.example.site/
子域-德语-https://de.example.site/

我已完成vhost配置,apache2服务器正在从和成功地为测试页面提供服务

但是,当我使用htaccess部署实际应用程序时,根域工作正常,但子域会导致以下错误

fr.example.site is currently unable to handle this request. 
HTTP ERROR 500
我的htaccess规则存在一些问题

这是我现有的htaccess内容

Options -MultiViews
RewriteEngine On
RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteCond %{HTTP_HOST} ^(?:www\.)?(.+)$ [NC]
RewriteRule ^ https://www.%1%{REQUEST_URI} [L,NE,R=301]


RewriteRule ^index.html$ index.php
RewriteRule ^(.*)-result.html$ result.php
RewriteRule ^2-letter-words-with-(.*).html$ twoletter.php
RewriteRule ^3-letter-words-with-(.*).html$ threeletter.php
RewriteRule ^words-starting-in-(.*).html$ wordstartedwith.php
我想添加子域fr和de的规则,以便从以下目录提供内容

-->/home/bitnami/htdocs/
-->/home/bitnami/htdocs/fr
-->/home/bitnami/htdocs/de


任何提示都会有很大帮助。

对于您展示的示例,请尝试以下内容。请确保在测试URL之前清除浏览器缓存

##For base site Rules.
RewriteCond %{HTTP_HOST} ^(?:www\.)example\.site [NC]
RewriteCond ^/?$
RewriteRule ^ home/bitnami/htdocs/ [L]

##For fr site Rules.
RewriteCond %{HTTP_HOST} fr\.example\.com [NC]
RewriteCond ^/?$
RewriteRule ^ home/bitnami/htdocs/fr [L]

##For de site Rules.
RewriteCond %{HTTP_HOST} de\.example\.com [NC]
RewriteCond ^/?$
RewriteRule ^ home/bitnami/htdocs/de [L]

嘿,拉维,我替换了htaccess文件的内容,但是,它出错了,说“HTTP错误500”。嘿,拉维,我替换了htaccess文件的内容,但是,它出错了,说“HTTP错误500”。这是现场站点名称:,@tamilrain,你能告诉我你是否在我的规则中用你的wordsquick.site更改了example.com吗?是的,Ravi,我用实际的站点名称和扩展名(example.com和wordsquick.site)替换了占位符@tamilrain,好的,我现在已经修正了规则,请你现在检查一下,告诉我进展如何好吗?