I host my website on DirectAdmin, the domain is redirected to example.com/wp, I have deleted all the wp files and redirect the domain to example.com/index.html, but nothings has been changed.
I also update the .htaccess file too
Directory Index index.html
Redirect 301 / http:example.com/index.html
but it still open the example.com/wp as the default page.
how I can force it to open the index.html page in public_html folder through the default domain?
Related
My wordpress site had redirect hack. Some files affected as: index.php, wp-config.php, wp-blog-header.php, and uploaded .ico file to source code
How to block the specialadves WordPress Redirect Hack
I had a WordPress instance hosted on a subdirectory on a domain. I have now changed the domain and moved the WordPress setup to the root of a new domain.
I have set up .htaccess on the old domain root directory as follows.
Redirect 301 /subdirectory https://newdomain.com/
And it's working pretty well. But for some reason, the assets in the subdirectory chain are throwing 403 forbidden. The following pattern ends up with 403.
https://olddomain.com/subdirectory/wp-content/uploads/1.jpg
What I might be doing wrong here?
Here is my folder directory
wordpress
project
html
index.html (html page)
wp-admin
wp-content
wp-includes
etc...
What I want if someone want to access the main directory folder i.e. project folder for example ( domain.com/project ) it redirect to wordress 404.php .htaccess
To ensure the server finds your 404 page, add the following line to your .htaccess file:
Deny from all
ErrorDocument 404 /page-404.html
Check the docs on Codex: Creating an Error 404 Page
Maybe help plugin:
http://wordpress.org/extend/plugins/private-files/
You need to create an .htaccess file in the directory you want to restrict. Then you will deny access to your directory and redirect redirect all "403 forbidden" request to a 404 page adding this lines to the .htaccess file:
Deny from all
ErrorDocument 403 /404
This are the only lines you need to include in this file.
I am re-building a static HTML website into Wordpress. The images directory structure is changing so I need to set-up 301 redirects - for Google Image searches so they keep working and point to the new image locations.
The images are currently using the static site /images/ directory.
/images/img1.jpg
/images/img2.jpg
/images/img3.jpg
I need them to 301 redirect to the Wordpress site /wp-content/uploads/ directory.
/wp-content/uploads/img1.jpg
/wp-content/uploads/img2.jpg
/wp-content/uploads/img3.jpg
Is there a single line of htaccess code that can redirect all of the images in the /images/ directory to their respective locations in the new /wp-content/uploads/ directory?
While accessing my WordPress website, I got directory listing error. I can access the site using http://example.com/index.php but not when I use http://example.com. I also tried put the .htaccess file in the directory. I had following code in my .htaccess file.
#BEGIN WordPress
#END WordPress
DirectoryIndex index.php
I solved it... If any want to change your site path not having access to control panel in your db go to the wp-options table change your site url link to http://www.example.com to the http://www.example.com/index.php