localhost wordpress重定向到XAMPP站点

my localhost in my browser keeps redirects to Welcome to XAMPP for Windows!

I have set the necessary at database url at wpe2_options, wpe2_posts , wpe2_postmeta

htaccss

# 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

but it doesnt seems to work, when i clicked the a link it keeps directing to the welcome xampp.

even tried Virtual Host,

<VirtualHost *:80>
DocumentRoot "C:\xampp\htdocs\site1"
ServerName site1.localhost 
<Directory "C:\xampp\htdocs\site1">
DirectoryIndex index.php
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>

this cause other localhost site redirecting to site1(wordpress)

Please help.

2个回答

Please check your .htaccess file, hope the below code solve your issue :

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

# END WordPress
duanpo7796
duanpo7796 我试过但是下面的子网站没有显示。找不到对象! 在此服务器上找不到请求的URL。 引用页面上的链接似乎是错误的或过时的。 请通知该页面的作者有关错误的信息。 #BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / ramcreditinfo3 / RewriteRule ^ index \ .php $ - [L] RewriteRule ^ search-corporate-profile /? /buy.ramcreditinfo/search-corporate-profile [QSA,L] RewriteCond%{REQUEST_FILENAME}!-f RewriteCond%{REQUEST_FILENAME}!-d RewriteRule。 /ramcreditinfo3/index.php [L] </ IfModule> #END WordPress
一年多之前 回复



在WordPress文件夹中打开wp-config.php文件,并设置以下参数。</ p>

  <代码>定义( 'WP_HOME',的 'http://示例.com'); 
define( 'WP_SITEURL',的 'http://示例.com');
</代码> </ PRE>
</ DIV>

展开原文

原文

Open wp-config.php file in the WordPress folder, and set following parameter.

define('WP_HOME','http://example.com');
define('WP_SITEURL','http://example.com');

dongshi6710
dongshi6710 我试过这不起作用。
一年多之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问
相关内容推荐