Control Access Via Htaccess
Apr 23, 2009how can i control via IP who can access a site? I want to redirect everyone to /downtime.php and only allow myself IP 1.1.1.1 to access the /index.php page and the entire site
View 2 Replieshow can i control via IP who can access a site? I want to redirect everyone to /downtime.php and only allow myself IP 1.1.1.1 to access the /index.php page and the entire site
View 2 RepliesI'm setting up a system that is really stretching the limits of what FTP can do.
Right now, I have a repository of files that only certain accounts should see, so I have another folder (one for each user) with tons of links to their appropriate files. Now all users must accept some T&C before any downloads, so I'm doing a per-IP permission based on this acceptance.
I'd really like to do this with HTTP, but our clients like the speed and reliability (resuming) that FTP provides. Are there any other solutions out there? Any different technologies? Any other methods I haven't thought of?
I have download manager script that I use for my customers to download products right after the purchase.
Script generates download link that looks like this:
http://www.yourwebsite.com/download/...582921B&p=1840 (where 2YY6582921B is receipt number that is different with each purchase).
All products are placed in one folder. This folder can not be seen in above download url, but can be accessed thru browser and files can be downloaded that way without paying for them.
Can I use .htaccess and if yes how, to protect all product files the way that they can not be accessed directly by visiting url thru browser (in case somebody will find the correct url), they should be allowed for access only for my download manager script.
after upgrading to plesk 11 i get this error (Image attached)
so basicaly i cant do nothing..
I would like to deny access to .log
View 1 Replies View RelatedI have been a solid cPanel / WHM user for the past 2 years, we have now since downsized our hosting requirements and also wanted to cut our panel costs and so we moved to PLESK 12 Web Edition.The server is on a trial license and has been working fine with no problems for the past 2 weeks. Today all of a sudden none of the websites are accessible, although I can ping all IP's on server and login via SSH.I cannot access any websites or hosting control panel, I have disabled IP tables as this was the cause of a problem last time.
Why this happened was there an update at around 5AM this morning which could have caused this?I have restarted the server, I can successfully ping / resolve address from SSH.
i would like to change the access control for datebase users via CL: command: /usr/local/psa/bin/database --update-dbuser web1_presta -server localhost:3306 reply: The database user was successfully updated. examination: mysql> select host, user from mysql.user;
+-----------+------------------+
| host | user |
+-----------+------------------+
| % | web1_presta |
| localhost | web1_oxid |
| localhost | web1_presta |
| localhost | web1_shopware |
| localhost | web1_wp |
+-----------+------------------+
Only when using the GUI:
home -> Subscriptions -> Website & Domains -> Databases -> Users -> web1_wp -> Access control
-> from Allow remote connections from any host
-> to Allow local connections only
is also the user adjusted:
mysql> select host, user from mysql.user;
+-----------+------------------+
| host | user |
+-----------+------------------+
| localhost | web1_oxid |
| localhost | web1_presta |
| localhost | web1_shopware |
| localhost | web1_wp |
+-----------+------------------+
I have recently had number of websites that link directly to images from my website. This is not hotlinking, it is direct server request. As an example: on the linking website there is image gallery script with thumbnails and when the visitor clicks on the thumb it calls the image from my website.
I block their IP-s in .htaccess, but it is not the best way to stop them since IP change. Is there any way, similar to anti-hotlinking, to deny such direct access to my images by domain name i.e. to allow only from my website and deny from all others. Or something else that could work in my case with .htaccess.
How can I allow only one ip or a list of ip addresses to access port 8443.I need to limit access this port to few ip addresses and not everyone
View 6 Replies View RelatedI found a great little app called ID Shutdown Manager which bascially lets you do stuff like wake on LAN, Shutdown, Log Off etc.
The App also has a cgi script which you can call from a web server so you get a web interface to the program.
This is exactly my reason for getting the app as I just wanted to host a web page where I could login from the internet and wake on lan my media PC.
Ok so...
The app gives you all the iis or apache setup instructions and tells you to place the cgi script which is actually a .exe into the scripts folder and then enable basic authentication for it.
Done.
So if I navigate to <SERVER>/scripts/sdmancgi.exe its supposed to give me a user / pass prompt and then when login successful I see the app and can wake on lan etc.
ok I have got this to work
on the actual machine where server is running I can access it in IE7 by localhost etc.. and it works
However when I try to access from another PC in my lan by typing <SERVER>/scripts/sdmancgi.exe I get a nice little message saying the content cannot be displayed you may require to insall a program or something to display it.
If I try to access the page from firefox on same remote PC, it works!
I can also access page from outside my LAN, it works on my N95 browser.
Also I have had friends try it from firefox from the Internet and they say it works as well.
Forgot to mention I am running on port 8081 as I already have other servers running on 8080 and 80 (one is my router and the other server installed itself from setup.exe and I dont know what server its using)
I have also tried latest apache server as well as some other free one. Both have the same effect. Ok in firefox, not in IE.
One would think its a problem with the cgi file not compatible with IE7 however, I even tried to go to default page setup in IIS <SERVER>:8081 and I get the same message. So at this point the server hasnt even tried to access CGI or prompt for Basic Authentication.
I tried googling and not much luck. I read something about CSS and when I view source of failed web page from IE7 it mentions something about CSS so dont know if this is it?
I'm having trouble with a vps and the ips won't ping and can't connect via ssh.
I can via hypervm console when I run apt-get update but it doesn't download anything.
I have successfully installed dns only to my vps. the problem is when i try to add it to the cluster system on my other vps it asks for a remote access key, so i visit both ip:2087/scripts/setrhash and ip:2086/scripts/setrhash and it shows an unable to connect error in firefox.
this is both using [url]
does anyone know how i can access the remote access key?
I would like to ask you what software I need to control VPS - stop it when it expires the owner's account and he must pay agan to use it.
Software must work with VMware, Solaris conteiners (xVM server), Virtuozzo and etc.
What software for billing the VPS can you recommend me?
Is there a second way to control the access to the VPSs? Can I install hardware firewall before the servers witch host VPSs and install billing software on that firewall so when the owner don't pay for the VPS the firewall cuts the access to the VPS.
in that case what software I have to use.
I have VmWare VPS hosting, I just started and I have few questions. How can I see how much bandwidth each VPS consumes? How can I know if someone is doing illegal activities like spam, file sharing, IRC, etc.? I ask this because I give complete control over VPS to my customers so I don't have access to it, only thing I do is backup of whole VPS image on spare HDD, and network/hardware troubleshooting. So how to control whats happening on my VPS-es?
View 7 Replies View RelatedI am using a script, on which i want to enable friendly URL, below are the instructions.
Friendly URLs Settings
Apache Settings
(please add the following lines to your
.htaccess file to turn on friendly URLs)
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /hcl/friendly_url.php [L]
</IfModule>
But, issue is, i am using IIS on Windows Server.
How can i implement this?
I want a rule in .htaccess that will convert all .com addresses into .co.uk ones as I have a .com mapped to the .co.uk address for the site.
View 7 Replies View RelatedI have a vds with godaddy. I uploaded my site and then uploaded .htaccess (AddHandler server-parsed .html) Then when I go to my site in browser I get this error.
Safari can’t open the page “mydomain”. The error was: “lost network connection” (NSURLErrorDomain:-1005) Please choose Report Bug to Apple from the Safari menu, note the error number, and describe what you did before you saw this message.
The thing is, I did the exact same thing on another domain with the same htaccess file and everything works fine. SSI is enabled on both.
I'm currently having a problem with a site of mine. The problem is that trying to go to domain.com/subdirectory/ (with or without the trailing slash) gets a 404 error (even though the directory exists).
However, domain.com/subdirectory/file.php works fine.
When trying to figure out what is causing this, I remembered that someone who recently did some work on this site had to add something to the .htaccess file. Here's what they added:
RewriteCond $1 !.(php|ico|gif|jpg|png|css|js|htm|html|txt|zip|pdf)$
RewriteCond $1 !^$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?/$1 [L]
I haven't done much with .htaccess, so I really have little idea what any of the above means or does (although I know it does something important).
So I guess my question is, could this bit of code be causing my problem? And, if so, how can it be corrected without messing up what this code was put there for in the first place?
My application is on Windows plateform and using IIS as webserver.
Can I use .htaccess to secure my directory...
Code:
RewriteCond %{QUERY_STRING} ^showtopic=([^&]+)&st=0$ RewriteRule ^forum/index.php$ [url]
I get a 500 Internal Server Error when I put that in my .htaccess file. Got it from [url]
htaccess file that will redirect all requests for the domain to --
https://www.
so what I want is all traffic to be secure and use the 'www'.
If I do rm -f *.* I see that .htaccess is not deleted
If I do copy -f *.* /somedir .htaccess is not copied.
Why?
What should I do to represent all files including .htaccess?
i have a mobile download site.. now i dont want users to directly download from my site.. i mean hotlinking..
I hav a referal thing in my .htaccess
RewriteCond %{HTTP_REFERER} !^[url](/)?.*$ [NC]
Now there is a flashget like software for mobiles.. i want that my users are able to download using that software but the prob is that soft doesnt sends any referal info.. so in my .htaccess i want to allow that software and i am trying this
RewriteEngine on
RewriteCond %{HTTP_USER_AGENT} ^.*FGet 1.0.*$ [NC]
RewriteCond %{HTTP_REFERER} !^[url](/)?.*$ [NC]
RewriteCond %{HTTP_REFERER} !^[url](/)?.*$ [NC]
RewriteCond %{HTTP_REFERER} !^[url](/)?.*$ [NC]
RewriteRule .*.(zip|avi)$ - [F,NC]
where FGet 1.0 is the HTTP_USER_AGENT send by the software, but this doesnt works.. can plz give me the right code for it
I'm have a bit of a mare getting some htaccess to work.
Here's my code:
Code:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-F
RewriteRule ^([-_!*$@~:.a-zA-Z0-9]+)$ [url]
The above works on a CPanel server but i've just moved the site to a fedora core 6, with standard httpd no control panel.
This is an entry from my log files:
PHP Code:
X.X.X.X [28/Sep/2007:11:51:34 +0100] "GET /my_profile.php?username=my_profile.php HTTP/1.1" 302 349 "-" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30)"
For some reason it appends the my_profile.php to the end of the url, and it does it to any file in the same directory and just keeps going around in a loop, why would it do this?
I tried contacting the live support from fatcow, and he was no help. It was probably just the guy i had but thats not the point. I think i am going to go with them but what control panel do they use?
View 14 Replies View RelatedI'm up Games for Windows VPS servers with VMWare Server ESXi and wonders whether some option to control the traffic of each IP, I thought about using a "Cisco ASA 5500" but I do not know if it has this option:
Example:
IP 192.168.254.1 = 100GB monthly.
IP 192.168.254.2 = 50GB monthly.
Etc. ..
know if i was to start a vps company. What FREE vps software and control panel are out there?
View 14 Replies View Relatedi want to install centos with xen to run vps service,
i know virt-manager can be used to manage xen under centos for admin,
i want to if there are any other good GUI control panel for xen?
Xen control panel because I just got a server so I can try out using Xen instead of OpenVZ. Most of the control panel's that I've seen only support OpenVZ at this time. Would anyone be able to suggest a good panel that I could try out or look at?
I know HyperVM is one but can it be trusted as of now? I know that they have people working on it and there are no major hacks right now (at least not yet) but would it be suggested to use it?