I have a site with some html files on it. One of them is contact.html. This is my .htaccess, and I'm having problems where I can address the page with site.com/contact, but not site.com/contact/. (Note ending slash.) What's the fix?
RewriteEngine On
# If the requested URI does not contain a period in the final path-part
RewriteCond %{R...
Suppose I setup a simple php web server with a page that can be accessed by https. The url has simple parameters like https://www.example.com/test?abc=123. Is it true that the parameter here in this case will be safe from people sniffing the packets? And would this be true if the server does not employ any SSL certificate?
...
Hey all,
I have the following rule:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
and my url is as follows:
http://www.mydomain.com/189-9544737-0616922?%5Fencoding=UTF8&node=10
On myphp.php
var_dump($_GET): array(3)...
I have added the following line in my Apache httpd.conf: -
AddOutputFilterByType DEFLATE text/html text/css application/javascript application/x-javascript application/json
I have a html file (test.html) with a script inclusion: -
<script type="text/javascript" src="/test.js"></script>
The problem is, every time I load test.html, t...
I have transferred my website from old server to shared server.
All my code is in "lfdata/main/com" under "public_html" on the shared server.
The clean URL would look like follows:
http://ip-address/~name/how
and the rewritten URL should be:
http://ip-address/~name/lfdata/main/com/how.php
So can anyone suggest a rewrite rule for cr...
Do any of you folks do redirection by IP (within Apache) for people coming
to your website from different countries?
What do ye use? mod_geoip and/or a whole pile of mod_rewrite rules?
Is mod_geoip reliable/well-performing/accurate?
...
Hi,
I have inherited a number of grossly coded PHP files, whose output I need to alter programmatically.
To achieve this, I chose to run them through another PHP file, rewriter.php, which looks approximately like this:
<?php
if(!preg_match('/^([a-zA-Z0-9\-_]*)$/', $_GET['page']))
die('Incorrect page supplied.');
ob_start('changeOutp...
I've gotten a new machine, but it came with Vista. I figured it would be best to wait for W7 before I spent any money on an OS, so I'm stuck with it for now. But I must get my development environment setup, and soon!
My machine came with McAfee, which I'm using for the moment, and I've let port 80 be open and I've given httpd.exe acce...
How would you secure access to the admin area for a web app?
Our Rails CMS serves pages publicly. I would like to make the backend (/admin) inaccessible using either the webserver(apache) or firewall(netfilter).
Could this be done using an SSL certificate? I would like to limit access to the backend to only those whose have the "key"...
I'm trying to setup my charset in a html view in a RoR application.
I configured already the charset by meta equiv tag:
**meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" **
It didn't work, so i tried to change my .htaccess (its a RoR application running under apache) but here is my problem. Normally i could use th...
webmin is a administration/UI framework for configuring software. I am curious if anyone know what the Java equivalent might be?
...
The following post explains about the page caching in rails with Nginx.
http://blog.hasmanythrough.com/2008/1/30/segregated-page-cache-storage
I like to implement this solution with my app but on Apache.
So, the main block/route is
if (-f $request_filename) {
break;
}
if (-f /cache$request_filename) {
rewrite (.*...
I'm working on my OS X with the default installation of Apache. For some reason, when I run the "apachectl" command without the "sudo" I get "no listening sockets available / unable to open logs." I'm guessing this is a permissioning thing, so can someone help me out? I'm using Apache 2.2.
Also, side question, where the the Apache sc...
I have a site that makes use of GET variables to determine what to display.
@session_start();
@extract($_GET);
@extract($_POST);
.
.
.
if (!$menu) { include("home.php"); }
if ($menu=='buy') { include("buy.php"); }
if ($menu=='invalidbuy') { include("invalidbuy.php"); }
if ($menu=='buydone') { include("buydone.php"); }
.
.
.
I think I ...
This should be easy, just curious. I know "httpd" is the HTTP daemon, just curious what the relationship is between "httpd" and "apachectl."
...
I am using the Kohana framework (but I think it's irrelevant for this question) and pages can be accessed like so
http://www.example.com/articles/
http://www.example.com/index.php/articles/
Now, as a rule of thumb, I generally try and tweak my .htaccess to only allow one way in for a page, and silently redirect other common ways.
Ess...
I am using these rules and conditions in .htaccess to turn these
http://www.example.com/index.php/about/history
http://www.example.com/about/history/index.php
into
http://www.example.com/about/history
.htaccess
# ensure there is no /index.php in the address bar
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /.*index\.php\ HTTP/
R...
<VirtualHost *:80>
DocumentRoot /lf/main/com
ServerName 74.220.215.241/~laborfa2
ServerAlias 74.220.215.241/~laborfa2
RewriteEngine on
#RewriteLogLevel 2
#RewriteLog logs/rewrite.log
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME}.php -f
RewriteRule ^/(.*)(/?)$ /$1.php [L]
RewriteRule ^/([a-zA-Z]+)([a-...
I am writing a small application to get the various diagnostic parameter of Apache Webserver like time of the start of the server, Worker mode or Prefork mode, server version and many more. I have found few API for getting info about these parameter. But I colud not find nay API for the getting start time of the WebServer. Is there any s...
Ugh.. mod_rewrite makes me feel stupid. I just haven't wrapped my brain around it yet. :/
I have this url:
http://example.com/a/name/
...that I want to point here:
http://example.com/a/index.php?id=name
...where name is what is getting passed to index.php as the id argument.
Anything I've tried results in either a 404 or a 500.. :(...