Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Hosting and Servers
  4. How to allow access to a yii web application for specific users using .htaccess

How to allow access to a yii web application for specific users using .htaccess

Scheduled Pinned Locked Moved Hosting and Servers
sysadminhostingapachetutorialquestion
1 Posts 1 Posters 4 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    User 13902957
    wrote on last edited by
    #1

    I am using yii2 basic application template and developed an application.
    I am using VPS server for hosting this application on a domain on Host gator.

    Now I want that only office users should access this application i.e, (while accessing this application using domain, .htaccess file should check if the IP accessing this domain is allowed to have access. If yes, then that IP should be able to have access, else that IP should see a message containing Access Denied).

    If we do this then how to specify IP addresses in .htaccess file. Do we need to specify the static IP addresses of the employees in our organization?

    If we write the foll code in .htaccess,

    order allow,deny
    allow 192.168.1.3
    deny from all

    Here, which IP address to be specified? Do we need to specify the Public IP or routers Private IP or static IP?

    How to accomplish this?

    Does IP address change from network to network. When I connect to my WiFi, i get my public IP. So this IP is unique in the world?

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups