Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
RewriteCond Help
#1
Ok i have a problem and its got me stumped.
I want to use the RewriteCond within .htaccess to redirect people to a certain page based on there ip.
Now i can get it to work using below.

Code:
RewriteCond %{REMOTE_ADDR} ^123\.4\.567\.890
RewriteCond $1 !^index\.php$
RewriteRule (.*) /not_welcome.php [R=302,L]

Now that will force anyone with the ip of 123.4.567.890 to the not_welcome.php page whenever they try to go to the index page.
That works just fine but its problematic. If you go to any other page apart from index then it does not work.
Now i have tried the wild card * option with no luck.
I have tried changing index\.php to everything i can think of and had no success.
Anyone know enough about it to put me in the correct location?

Ultimately what i want to do is force specific ips to a page whenever they try load up register.php
The Rules!
FTW Forum <-- Home of the Damned! --> Join me On MM


Reply
#2
Any takers? (bump) (still too short)
The Rules!
FTW Forum <-- Home of the Damned! --> Join me On MM


Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)