http access to subdirectories as well

Asked 2 years ago, Updated 2 years ago, 60 views

Put WordPress in a dedicated directory - WordPress Codex Japanese

I put wordpress in the wp directory with reference to the above page.(Actually another name, but wp together with the descriptive references.example.com is also a temporary value for reference.)

And I did the following.

Change Site Address

Site Address (URL) >http://example.com

Copy index.php and .htaccess

Copy index.php and .htaccess files from the WordPress directory to the root directory of the site

Edit index.php

Edit the index.php file in the root directory

Now, if you do this, you'll be able to do it as you'll get it right.

I was able to access it in the format http://example.com, but I can also access it in the format http://example.com/wp.

http://example.com/wp is unnecessary, so I think it would be better to return 404 but what should I do? Or is the format http://example.com/wp accessible for wordpress etiquette?

wordpress

2022-09-30 18:05

1 Answers

.htaccess means apache.

If you want to deny access to the wp directory, you can use the following URL to set the wp directory without writing Allow.
http://blog.shinkaku.co.jp/archives/45972397.html

I don't know how to use wordpress, but I don't think you should publish unnecessary items, so it's better not to be able to access them.


2022-09-30 18:05

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.