Changing the URL and redirecting

Connect with other users about what to run on your webhosting (and how to run it) here.
Post Reply
Lunaversity
New to forums
New to forums
Posts: 12
https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
Joined: Wed Aug 06, 2014 2:15 am

Changing the URL and redirecting

Post by Lunaversity »

Hello, I am looking to improve the security of the Website we currently are using. I would like to make it so if people type in the link to the Administration Center it would redirect them to another page, but I would like to change the link to the Administration Center as well. Would anyone know how to do this on SMF? I also have Simple Portal installed with it as well.

Thanks.
User avatar
soja
This is my homepage
This is my homepage
Posts: 2389
Joined: Fri May 18, 2012 3:20 pm

Re: Changing the URL and redirecting

Post by soja »

Here is some info I found on http://stackoverflow.com/questions/8985 ... s-but-mine


Options +FollowSymlinks
RewriteEngine on
RewriteCond %{REMOTE_ADDR} !=123.45.67.89
RewriteRule index.php$ /construction.php [R=301,L]


put this in a .htaccess file inside your admin directory.

Replace the IP with yours, and replace the index.php with the file in your admin directory, and construction.php with your site index.

Let me know how it works.
Not a NFO employee
Lunaversity
New to forums
New to forums
Posts: 12
Joined: Wed Aug 06, 2014 2:15 am

Re: Changing the URL and redirecting

Post by Lunaversity »

soja wrote:Here is some info I found on http://stackoverflow.com/questions/8985 ... s-but-mine


Options +FollowSymlinks
RewriteEngine on
RewriteCond %{REMOTE_ADDR} !=123.45.67.89
RewriteRule index.php$ /construction.php [R=301,L]


put this in a .htaccess file inside your admin directory.

Replace the IP with yours, and replace the index.php with the file in your admin directory, and construction.php with your site index.

Let me know how it works.
This might be a retarded question but I honestly have no idea where the admin directory is. I've looked up .htaccess would I put that in the root file */public/.htaccess?
User avatar
soja
This is my homepage
This is my homepage
Posts: 2389
Joined: Fri May 18, 2012 3:20 pm

Re: Changing the URL and redirecting

Post by soja »

No, what is your admin panel link?

For example at my community it is https://gflclan.com/admin/index.php

So I would place the .htaccess in my public/admin/ folder.
Not a NFO employee
Lunaversity
New to forums
New to forums
Posts: 12
Joined: Wed Aug 06, 2014 2:15 am

Re: Changing the URL and redirecting

Post by Lunaversity »

soja wrote:No, what is your admin panel link?

For example at my community it is https://gflclan.com/admin/index.php

So I would place the .htaccess in my public/admin/ folder.
Mine is index.php?action=admin
And there is no admin directory. I am using SMF
.=QUACK=.Major.Pain
This is my homepage
This is my homepage
Posts: 1573
Joined: Sun Jun 26, 2011 8:03 am

Re: Changing the URL and redirecting

Post by .=QUACK=.Major.Pain »

Do you have a admin.php?
Visit gspreviews.com And Rate & Review Your Old & Current GSP's
Find Your GSP Coupons at gspreviews.com/coupons/
Lunaversity
New to forums
New to forums
Posts: 12
Joined: Wed Aug 06, 2014 2:15 am

Re: Changing the URL and redirecting

Post by Lunaversity »

The clostest thing I have to that is Admin.template.php and that's located in the themes/default.

( Sorry for the late reply been on vacation )
Post Reply