我已经有一个页面运行wordpress。所有内容都在文件夹中,因此当我打开页面时,我在URL中看到文件夹名称:example.com/new/gallery
是否可以从URL隐藏" new/"?
我有2个.htaccess文件,一个在根中:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^$ new/ [L]
RewriteRule (.*) new/$1 [L]
</IfModule>
和"新"文件夹中的一个:
<IfModule mod_rewrite.c>
RewriteEngine on
# Ebben az alkonyvtarban vagyunk, ezt
# figyelembe kell venni az atirasoknal
#RewriteBase /cegunkwebhelye
# Minden nemletezo oldal webcimet iranyitsuk at az index.php-re
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [QSA]
</IfModule>
DirectoryIndex index.php index.html index.htm
# BEGIN WordPress
# END WordPress
请帮助我!谢谢!
取回您的单词按数据库并记录到管理面板。
1)转到设置>>一般
删除/new/from
Site Address (URL) :
2)复制index.php和.htaccess从'new'文件夹中粘贴在新文件夹之外。
3)编辑index.php
require( dirname( __FILE__ ) . '/wp-blog-header.php' );
to
require( dirname( __FILE__ ) . '/new/wp-blog-header.php' );
并检查示例'您的主要域'。它将加载网站,而不会从URL中加载"新"。