Question

Connecting via ip X.XXX.XXX.XXX/. Is asking login and password is OK?

  • Posted on August 16, 2014
  • morleoAsked by morleo

Connecting via ip X.XXX.XXX.XXX/

Is asking login and password is OK? (hostname will be later, It’s updating It’s nameservers)

It looks like .htaccess file in folder doing It. But in the main folder .htaccess look like

# 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

Thank you!

UPDATE: But site loads in the background and If I press Cancel everything works properly. But It hasn’t ask for login and password. (.htaccess login/password window)


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

To ask for a username and password, you need to add something like this to your .htaccess file:

AuthUserFile /etc/apache2/.htpasswd
AuthGroupFile /dev/null
AuthName "Please Enter Password"
AuthType Basic
Require valid-user

Then to set the password, run:

htpasswd -c /etc/apache2/.htpasswd username

For all the details, check out: How To Use the .htaccess File