最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

我的主域或子域上的运行节点JS阻止访问我的子域(500错误)

运维笔记admin11浏览0评论

我的主域或子域上的运行节点JS阻止访问我的子域(500错误)

我的主域或子域上的运行节点JS阻止访问我的子域(500错误)

我遇到一个问题,每当我在主域或子域中启动节点服务器时,所有其他子域都会出现500错误,并且无法访问。我需要能够访问我站点上的子域,因为那是API数据所在的位置。

。htaccess我的应用程序的域/子域:

RewriteEngine on
RewriteRule  (.*)  http://localhost:3000/$1  [P,L]
DirectoryIndex disabled

# Cache Control and Enable CORS
<FilesMatch "\.(js|css|jpg|gif|png|pdf|swf|svg|svgz|ico|ttf|ttc|otf|eot|woff|woff2|webp)$">
 <IfModule mod_headers.c>
    ExpiresActive On
    ExpiresDefault  "access plus 1 month"
    Header set Cache-Control "public, immutable, max-age=2628000, s-maxage=2628000"
    Header set Access-Control-Allow-Origin "*"
 </IfModule>
</FilesMatch>

。htaccess的子域(WordPress):


# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase //
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . //index.php [L]
</IfModule>

# END WordPress

如果在错误的地方结束,将不胜感激,并向您道歉!

回答如下:

删除Wordpress .htaccess上的双斜杠。它应如下所示:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress
发布评论

评论列表(0)

  1. 暂无评论