How to use the setEnv variable in apache?
Hi, I need to set my apache environment to 'foobar' I know I need to set in in my vhost, but what should i type there and where? ...
Hi, I need to set my apache environment to 'foobar' I know I need to set in in my vhost, but what should i type there and where? ...
I have this rule which redirects all requests without a . in them to index.php, and it works fine: # Redirect all page requests to content handler RewriteRule ^([^.]*)$ index.php [L] Now I'd also like to disallow any requests where the original URL contains .php in it. When I add another rule like this (after the first one), the first...
Hello I have two different sites on same domain for example: First site in the root directory http://example.com/ Second site in subfolder http://example.com/site2/ Each site have his own .htaccess When i enter to second site (http://example.com/site2/), in log of mod_rewrite i see that apache trying to execute .htaccess of first site (h...
We are setting up an API and we want to use Apache mod_rewrite to direct all accesses to http://api.domain.com to the script located at /cgi-bin/api.pl. Here is what we're currently using: RewriteEngine on RewriteCond %{HTTP_HOST} ^api.domain.com$ [NC] RewriteRule ^(.*)$ /cgi-bin/api.pl [NC,L,QSA] However, this is giving us the follo...
I need to replace the encoded value for the & sign in my url so the search query is successful. Im struggling to copy a similar method from the solution in this post for a query string such as below. lovelakedistrict.com/result/?q=Brookfield+Bed+%2526+Breakfast I want it to be like so lovelakedistrict.com/result/?q=Brookfield+Bed+&+Br...
Hi I've tried dozens of different ways of doing this but can't get any of them to work. My .htaccess does a few things, like setting a custom 404 and blocking image hotlinking. I want to do two things on the URL: add www. if it isn't there (rather annoying Facebook login can't cope with two different sources!), and replacing // with / e...
Sorry for the newbie question... When I go to http://www.plans4boats.com/scripts/youtubeplayer/ in Google Chrome, I can see a full listing of the files there. What should I do if I don't want any old hacker to just come in and view/copy my source codes? Does it have something to do with htaccess? I discovered that putting a blank ind...
Hi Folks, I created a little proxy node script, which looksup the request.url and either passes a request to my apache server or uses node to process/response to this request. I have been successful so far, everything works fine, but when I enable mod_deflate for the apache, "strange things will happen". It looks like node just "cancel...
I set up .htaccess / .htpassword and It works, except when I type the password incorrectly it still logs me in.. If I use a completely different password, doesn't work. A different user name, it doesn't work. But if I use the proper user name and mostly the right password, it works? Example: password I'm using is "firefight", and "fir...
Hello guys! Im moving my site from webfaction to linode VPS. My VPS have 512MB of ram with Fedora Core 13, and when i start apache/mysql and access the site from browser, my site take MINUTES to load, and memory looks like this Mem: 510652k total, 504652k used, 6000k free, 3460k buffers Swap: 1048568k total, 5260k ...
I have a PHP-driven website that uses output buffering, generates the entire page and spits out a couple of headers (Content-Type and Content-Length) before sending the actual page contents. This works fine on my local Apache server but as soon as I uploaded it to my web host (also Apache), it failed with a 500 Internal Server Error, wh...
Hi all: Have to say I really don't understand how come this could happen: I've done some code in html, css and a little bit of javascript, nothing fancy, and just uploaded to two host servers, one to my commercial hosting, the other to uni server. The funny thing is my commercial server renders exactly as what I can see on localhost,...
hi all, I'm using the apache commons 4.x HTTPClient to make HEAD requests to URIs only to get the final post 302 URL location of that link. E.g: http://bit.ly/test1231 really points to cnn.com or something. What would be the best and most efficient way using HttpClient to achieve this in a server that could run for months with out leaki...
I was just wondering, it seems like a trivial thing, but the question arises, does the web server compute compression on files for every request that is made? if so, that would be hell CPU heavy as the site grows, what are the possible work arounds if that is the case? I thought it would be nice to pre compress files and use some mod_re...
How can I determine what add-ons to apache will be required for my php code? I have legacy php code that was setup a long time back (and we dont have the documentation on what was done at that time). I need to get this application working on another new server, but apache has yet to be installed. I would like to install only those comp...
Title says it all.. ...
Hi .htaccess ninjas, I need help configuring my .htaccess file to handle redirects properly. Here’s what I need to have happen. Stackoverflow's spam filter wouldn't allow me to post the full domain. So where I say "DOMAIN" you can substitue "domain.com". (I also needed to add and extra t to the http.) Requests for the DOMAIN/page ve...
I need to get the data from cassandra with out case sensitive. Please help me. ...
hi I am using htaccess and htpassword file in my project. Everything is working fine but when I put an encrypted password in the htpassword file then password does not match, but when I put in a plain text password it does match. But I want to match the encrypted password. Please tell me what the the problem is and how I can resolve th...
I have the following rewrite rules: RewriteRule ^products/([a-zA-Z]+)$ /proyect/clients/index.php?database=$1&module=products [L,QSA] The directory structure is as follows: /var/www/proyect/clients/index.php When writing the address "http://host/products/clientA/" is directed into the "/proyect/clients/index.php?database=clientA&mo...