May 24, 2012, 04:44:57 AM
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
: follow us on twitter @dotdragnet
Home
Help
Search
Login
Register
DotDragnet
>
The Creative Side
>
On the web
>
Wordpress access by IP
Pages: [
1
]
Go Down
« previous
next »
Print
Author
Topic: Wordpress access by IP (Read 575 times)
Matt
DDN Contribs
Hero Member
Posts: 1710
Wordpress access by IP
«
on:
May 25, 2011, 01:59:11 PM »
I would like to block users from visiting a page and its child pages unless they are from an internal IP range (IE: so I can control what they see in school and at home in terms of a wordpress site)
I can create a custom page template, so if some simple PHP would do it then I can do that, and set each page with the custom page template.
Any ideas? Otherwise Im going to have to create two separate sites sharing the same database.
Logged
Mattian - IT Support & Website Design
|
@mattian
|
@msetchell
Jem
Sr. Member
Posts: 469
Re: Wordpress access by IP
«
Reply #1 on:
May 25, 2011, 03:00:23 PM »
One of the user management plugins allows blocking by IP - I was fiddling with it the other day. Unfortunately I can't remember which one it was. Sorry to be absolutely useless, but at least you now know the functionality is there...
Logged
oi.
suedenem
Sr. Member
Posts: 410
Re: Wordpress access by IP
«
Reply #2 on:
May 25, 2011, 03:12:34 PM »
Htaccess:
order allow,deny
allow from 123.
deny from all
...would allow access from the 123.xxx... range.
You should be able to use the 'files' directive if you're using 'permalinks' and don't want to manually create the directories.
Logged
So this SEO copywriter walks into a bar, grill, pub, public house, Irish bar, bartender, drinks, beer, wine, liquor...
Beware my weird, cross-dressing comment's; they are pretty standard examples of trolling.
Matt
DDN Contribs
Hero Member
Posts: 1710
Re: Wordpress access by IP
«
Reply #3 on:
May 25, 2011, 03:40:06 PM »
Quote from: suedenem on May 25, 2011, 03:12:34 PM
Htaccess:
order allow,deny
allow from 123.
deny from all
...would allow access from the 123.xxx... range.
You should be able to use the 'files' directive if you're using 'permalinks' and don't want to manually create the directories.
Hmm, this sounds like a plan, having never used this kind of thing have you got a link to a more in depth introduction to it? What is the 'files' directive?
THanks!
Logged
Mattian - IT Support & Website Design
|
@mattian
|
@msetchell
JasonD
Global Moderator
Hero Member
Posts: 551
Re: Wordpress access by IP
«
Reply #4 on:
May 25, 2011, 10:17:12 PM »
http://httpd.apache.org/docs/2.2/mod/core.html#files
But doesn't wordpress direct everything through one file? (Haven't used it in a million years, I may be wrong.) If so that wouldn't be a lot of use.
Logged
Matt
DDN Contribs
Hero Member
Posts: 1710
Re: Wordpress access by IP
«
Reply #5 on:
May 26, 2011, 08:08:26 AM »
Quote from: JasonD on May 25, 2011, 10:17:12 PM
http://httpd.apache.org/docs/2.2/mod/core.html#files
But doesn't wordpress direct everything through one file? (Haven't used it in a million years, I may be wrong.) If so that wouldn't be a lot of use.
Think it all goes through index.php
Logged
Mattian - IT Support & Website Design
|
@mattian
|
@msetchell
Matt
DDN Contribs
Hero Member
Posts: 1710
Re: Wordpress access by IP
«
Reply #6 on:
May 26, 2011, 10:06:33 AM »
http://wordpress.org/extend/plugins/intranet-restriction-for-posts-and-pages/
This plugin, and ensuring I was putting in the right IPs based on our proxy details etc worked
Logged
Mattian - IT Support & Website Design
|
@mattian
|
@msetchell
suedenem
Sr. Member
Posts: 410
Re: Wordpress access by IP
«
Reply #7 on:
May 27, 2011, 09:08:58 AM »
Quote from: JasonD on May 25, 2011, 10:17:12 PM
http://httpd.apache.org/docs/2.2/mod/core.html#files
But doesn't wordpress direct everything through one file? (Haven't used it in a million years, I may be wrong.) If so that wouldn't be a lot of use.
Note to self: either engage brain or don't post between tasks ;-)
I'd still use .htaccess personally (I'm not a fan of bolting on who-knows-what code into my sites unless it's been properly evaluated). A simple rewrite based on permitted IP range(s) and URL structure that the OP would like blocking would do the job.
Logged
So this SEO copywriter walks into a bar, grill, pub, public house, Irish bar, bartender, drinks, beer, wine, liquor...
Beware my weird, cross-dressing comment's; they are pretty standard examples of trolling.
Pages: [
1
]
Go Up
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General Category
-----------------------------
=> General Discussion
=> Jee's Forum of Appalling Jokes
-----------------------------
The Creative Side
-----------------------------
=> Arty stuff
=> Photography
=> On the web
-----------------------------
The Tech Side
-----------------------------
=> Tech stuff
=> Hardware & Software
-----------------------------
The Business Side
-----------------------------
=> Anything business related
-----------------------------
The Practical Side
-----------------------------
=> Practical Advice
DotDragnet
>
The Creative Side
>
On the web
>
Wordpress access by IP
Loading...