There is an article I read that I you can customize the WordPress Administrator login. It calls for editing the HTACCESS file. I have (2) HTACCESS files, one in my root on my server and the other located with in the WordPress installation. My server does not permit me to edit or change anything to the HTACCESS located in my WordPress installation, but I can edit or change the HTACCESS file in my root on my server. Proceeding with editing my HTACCESS file in my servers root. The article calls to add this to the HTACCESS file;

RewriteRule ^login$  [NC,L]

Obviously changing the code to what and placing the code you see above in the beginning of my HTACCESS file was required, doing this and changing to http://<mysite.com>/c_login.php [NC,L]. I was expecting to see the WordPress login screen, instead I got access denied ?

Dani AI

Generated

’s situation (two .htaccess files, editing the root one, then seeing “Access denied”) is a common host/configuration interaction rather than a WordPress bug. The likely causes are: Apache’s mod_rewrite not active or the rule placed in the wrong context, the WordPress install living in a subdirectory while the root rule points incorrectly, host-level security (mod_security or server rules) blocking the rewritten target, or file-permission/owner issues that produce a 403. is correct that plugins hide complexity, and ’s warning about plugins is worth noting — but manual fixes are also fine if the server config is understood.

Quick checks and safe steps:

  • Confirm the HTTP status (403 vs 404) and inspect the server error log for the exact reason (mod_security, permission denied, .htaccess syntax).
  • Verify mod_rewrite is enabled and that AllowOverride is set so .htaccess rules take effect.
  • If WordPress is in a subfolder, point rules at the correct path (leading slash and the subfolder name).
  • Test with a simple redirect to a static file to prove rewrite behavior before touching wp-login.

A minimal, safe redirect example (place in the correct .htaccess and back up first):

RewriteEngine On
RewriteRule ^login/?$ /wp-login.php [R=302,NC,L]

A simple custom front-end login file can avoid touching core:

<?php
require_once __DIR__ . '/wp-load.php';
wp_login_form();

Keep processing with wp_signon() or post to wp-login.php rather than editing core files.

Security notes and final pointers: do not rename or hack wp-login.php; test changes on staging; force HTTPS on login pages; consider rate-limiting or IP restriction via .htaccess if exposing a new login path; contact hosting support if the WP directory .htaccess cannot be edited — that often reflects host policy. Plugins (e.g., route-hiding tools) simplify this safely if manual server tweaks are not possible.

Recommended Answers

All 4 Replies

I know there are a few tutorials on the web for solving this, I can't give my opinion because I might mis-guide you... but I recommend using a plug-in if you want to customize. Remember, in Wordpress you want less coding so do your best to stay away from the editor. :)
Tell me if this helped

I want to code it in, I know there are plug-ins, but what is going wrong that it's not working ?

I thinks the problem basically in plug ins....

I got it working, without plug-ins :) If I could only master programming, sigh !

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.