Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am facing problem while adding ref-reral check in apache. Like
Whenever any one hit "http://abc.com/def/now.do", "now.do" file is opening.I want when ever anyone hit "http://abc.ocm/def/now.do". It should not be open, but when ever hit comes from internal java application It should responce to java application.
I am applying following rule, But it's not working,
RewriteEngine On
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} ^http://abc.com/ [NC]
RewriteRule ^/def\.(do)$ - F
First of all you have an error in the RewriteRule. You have to enclose F with square brackets (like [F])
Also your problem description is not very clear. I guess you don't want anyone to access /def/now.do (or is it for any .do file?), if it's not coming from your server.
In this case you can put in apache .conf file the following:
Thanks for your reply, But apache is still serving this url:
I do not want that apache serve for any request that comes to directly "http://abc.com/def/*.do".
Example: http://abc.com/def/abc.do ----- should not serve. http://abc.com/def/xyz.do ----- should not serve.
I want only one thing that is "http://abc.com/def/*.do" should not open directly in any internet explorer like(firefox, google chrome, IE.
But with this rule I am getting the same error on even on "http://abc.com/one.html".
This url is also not opening and still getting "*.do" file in browser.
Last edited by vishalsamyal; 11-05-2012 at 11:24 AM.
But with with rule am getting the same error on even on "http://abc.com/one.html".
This url is also not opening and still getting "*.do" file in browser.
What error you get?
I had a typo in the rewrite rule, so you may try the following:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.