隐藏URL中的wp-content [英] Hide wp-content from URL

查看:417
本文介绍了隐藏URL中的wp-content的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以2天前,我在我们的城市网站



如您所见,第一个显示了我的安装目录和主题名称。第一个给出的网址是 http://tuguegaraocity.gov.ph/wp -content / themes / citygov / ,其中也包含我主题的名称。有什么办法可以隐藏我吗?或任何其他使其更安全的好方法。谢谢!

解决方案

您可以根据需要将主题名称更改为自己的主题名称或任何喜欢的名称。



更改主题名称的方法


  1. 打开主题 style.css ,您将在文件顶部找到主题名称以及主题信息。

  2. 重命名主题名称和主题说明,并提供所需的详细信息,然后保存文件。

请确保在执行此操作时您的主题处于非活动状态



例如:



在更改主题名称之前,您的URL如下所示:



http://tuguegaraocity.gov.ph/wp -content / themes / citygov /



更改后就像



http://tuguegaraocity.gov.ph/wp-content/themes/您的名字/

  / * 
主题名称:23个
主题URI:http://wordpress.org/themes/twentythirteen
作者:WordPress团队
作者URI:http:// wordpress.org/
说明:WordPress的2013年主题将我们带回到了博客,该博客提供了各种帖子格式,每种格式都以自己独特的方式精美展示。从充满活力的配色方案和匹配的标题图像,漂亮的字体和图标以及灵活的布局开始,到处都是设计细节,无论大小,它都适合任何设备。
版本:1.0
许可证:GNU通用公共许可证v2或更高版本
许可证URI:http://www.gnu.org/licenses/gpl-2.0.html
标签:黑色,棕色,橙色,棕褐色,白色,黄色,浅色,一栏,两栏,右侧栏,宽度可变,自定义标题,自定义菜单,编辑器样式,特色图片,微格式,后置格式,rtl语言支持,便利贴,可翻译的
文本域:23个

此主题与WordPress一样,均受GPL许可。
使用它可以使事情变得有趣,有趣并与他人分享您学到的东西。
* /

像上面一样,您将在style.css和您可以在那里进行更改。


So 2 days ago I launched our city website here and tried checking for some vulnerabilities using an online wordpress vulnerabillity scanner based on WPScan and I got this result:

As you can see, the first one shows my installation directory and the name of my theme. The url given by the first one is http://tuguegaraocity.gov.ph/wp-content/themes/citygov/ which shoes the name of my theme also. Is there a way that I can hide this? Or any other good way to make it safer. Thank you!

解决方案

You can change the name of the theme to your own theme name or whatever name you like as per your wish.

Methods to follow to change up the theme Name

  1. Open up your theme style.css and you will find the Theme name along with theme information over to the top of the file.
  2. Rename the Theme name and theme Description to your required details and then save the file.

Ensure that while doing this your theme is under De-active mode.

Ex:

Before changing the theme name your URL looks like :

http://tuguegaraocity.gov.ph/wp-content/themes/citygov/

After changing it will be like

http://tuguegaraocity.gov.ph/wp-content/themes/yourname/

/*
Theme Name: Twenty Thirteen
Theme URI: http://wordpress.org/themes/twentythirteen
Author: the WordPress team
Author URI: http://wordpress.org/
Description: The 2013 theme for WordPress takes us back to the blog, featuring a full range of post formats, each displayed beautifully in their own unique way. Design details abound, starting with a vibrant color scheme and matching header images, beautiful typography and icons, and a flexible layout that looks great on any device, big or small.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: black, brown, orange, tan, white, yellow, light, one-column, two-columns, right-sidebar, flexible-width, custom-header, custom-menu, editor-style, featured-images, microformats, post-formats, rtl-language-support, sticky-post, translation-ready
Text Domain: twentythirteen

This theme, like WordPress, is licensed under the GPL.
Use it to make something cool, have fun, and share what you've learned with others.
*/

Like the above you will be finding the theme info in style.css and you can make the change over there.

这篇关于隐藏URL中的wp-content的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆