Khaled Javeed
Khaled Javeed

Reputation: 355

PHP url redirect on PORT access

Its been full day googling my requirement but had no luck!

I want to make an "Admin Panel" for a website but dont want anyone to guess and hit admin area. Like: "http://www.mysite.com/admin" OR "http://admin.mysite.com/".

I want admin login to be displayed on accessing a port Like: "http://www.mysite.com:3535/" and this URL redirect to my admin area.

Should i look into .htaccess or PHP can do this alone?

Upvotes: 1

Views: 1546

Answers (1)

ChrisR
ChrisR

Reputation: 14467

Unless you have a webserver listening on that port you can't do that. You could run 2 webservers on one machine, one listening on port 80 (the default http port) and another running on port 3535 which simply redirects to another location but that sounds is silly.

There are better ways to securing your application from intrusion than just hiding your login page, google for it.

Upvotes: 1

Related Questions