小编Hov*_*ian的帖子

虚拟主机和htaccess重定向过多

我得到的问题是重定向太多.

我有一个WAMP服务器托管一些网站,但我有一个特定的网站有大约5个域名.我希望他们都指向正确的网站文件夹,并将所有内容重定向到单个域以进行搜索引擎优化.以下是虚拟主机文件中的内容:

<VirtualHost 50.62.82.101>
ServerAdmin info@hovaness.com
DocumentRoot "c:/wamp/www/example"
ServerName example.com
ServerAlias example.net www.example.com www.examples.net www.examples.com examples.com examples.net
ErrorLog "logs/example.com.log"
Run Code Online (Sandbox Code Playgroud)

htaccess文件如下所示:

RewriteEngine On
RewriteRule ^(.*)$ http://sellingwarriors.com/$1 [R=301,L]
RewriteBase /
Run Code Online (Sandbox Code Playgroud)

我只应该有一个或另一个吗?我也尝试过htaccess文件:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^(.*?).example(s?).(.*)$ [NC]
RewriteRule ^(.*)$ http://example.com/$1 [R=301,L]
RewriteBase /
Run Code Online (Sandbox Code Playgroud)

任何帮助表示赞赏

apache .htaccess mod-rewrite multiple-domains

8
推荐指数
1
解决办法
2万
查看次数

无法解析empty-module.jsreact-native和metro-cli

我已经从 Windows 开发环境切换到 Linux 环境,但在让反应本机应用程序再次运行时遇到问题。该应用程序使用 gradle 构建并完美安装到手机上adb,当我通过 Metro ( ) 发送应用程序构建时,npx react-native start我得到以下内容。该包存在...所以我不明白为什么找不到它。我不明白的是为什么from /home/hovaness/Public/ignitefolderscan/_当它首先不是一个真正的目录时会返回......

错误

错误:错误:无法解析模块/home/hovaness/Public/ignitefolderscan/node_modules/@react-native-community/cli-plugin-metro/node_modules/metro-runtime/src/modules/empty-module.js/home/hovaness/Public/ignitefolderscan/_/home/hovaness/Public/ignitefolderscan/node_modules/@react-native-community/cli-plugin-metro/node_modules/metro-runtime/src/modules/empty-module.js项目或这些目录中找不到: node_modules

Ignite-cli 医生

System
  platform           linux                                                        
  arch               x64                                                          
  cpu                20 cores           Intel(R) Core(TM) i9-10900X CPU @ 3.70GHz
  directory          ignitefolderscan   /home/hovaness/Public/ignitefolderscan    

JavaScript (and globally-installed packages)
  node                            16.14.2                                   /bin/node                                                    
  npm                             8.7.0                                     /home/hovaness/Public/ignitefolderscan/node_modules/.bin/npm
    @react-native-community/cli   7.0.3                                                                                                  
    corepack                      0.10.0                                                                                                
    expo                          44.0.6                                                                                                
    jetifier                      2.0.0                                                                                                  
    n                             8.1.0                                                                                                  
    npm                           8.7.0                                                                                                  
    npx                           10.2.2                                                                                                
    pnpm                          7.0.0-rc.6                                                                                            
    react-native-cli              2.0.1                                                                                                  
    yarn                          1.22.18                                                                                                
  yarn                            1.22.18 …
Run Code Online (Sandbox Code Playgroud)

npm reactjs react-native metro-bundler

5
推荐指数
1
解决办法
2796
查看次数

Asp.Net应用程序数据库连接问题

当我尝试使用C#连接到我的应用程序到我的数据库时,我在Visual Studio 2005中成功构建了应用程序但是当我在调试器中运行该站点时出现错误:

Exception Details: System.ArgumentException: Format of the initialization string does not conform to specification starting at index 118.
Run Code Online (Sandbox Code Playgroud)

这是给出错误的连接代码:

SqlConnection con = new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["Server"].ConnectionString);
Run Code Online (Sandbox Code Playgroud)

我在我的web.config文件中正确编写了连接字符串,因此我对此远程意味着什么无能为力.我不确定我是否遗漏了任何东西.任何帮助赞赏.以下是我可能有用的部分的完整代码:

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Web.Configuration;
using System.Data.SqlClient;

public partial class RateAnalyzerPage: System.Web.UI.Page
{
    protected void Search_Click(object sender, EventArgs e)
    {
        string IDnumber = mechantNumber.Text;
        string selectSQL = "SELECT FROM Authors Where MID='"+ IDnumber +"'";
   // SqlConnection …
Run Code Online (Sandbox Code Playgroud)

c# asp.net ado.net sql-server-2008

3
推荐指数
1
解决办法
2049
查看次数