apache

How to create directory like urls for each page on a website

Hi, I have a content site that spreads across multiple pages but there is only 1 index.php file which retrieves the data from the database based on the page no. Currently the url direction has to be something like domainname.com/Page/content.php?page=3 I have noticed, quite a few sites have directory like structure for the urls like: ...

call stack missing info on mono with apache and mod_mono

How do i enable debugging/stacktrace with filenames and numbers with apache2/mod_mono? Instead of filenames and numbers i get something like this at System.Web.StaticFileHandler.ProcessRequest (System.Web.HttpContext context) [0x00000] in <filename unknown>:0 I tried using MonoDebug true in apache and recompile mod_mono with --enable...

Rewriting URLs in htaccess

I am trying to rewrite some url's. All the Urls look something like this www.domain.com/index/c/index/ www.domain.com/index/c/about/ www.domain.com/index/c/store/ I would like these urls to look like the following: www.domain.com www.domain.com/about www.domain.com/store I have tried several different things in the htaccess file but ...

How to detect root folder in URI when using apache mod_alias and mod_rewrite?

How to detect root folder in URI when using apache mod_alias and mod_rewrite? I have an website running on a sub folder in of the document root for example /var/www/this/an/other/dir in this folder I have a .ht_access file with mod_rewrite rules to redirect everything to index.php # Do nothing if the file (s), link (l) or (d) exists Re...

Eclipse and How it Handles JARS -- Odd Case

Trying to make some small changes to Apache's Velocity engine. Here's what I can and can't do. I'm making a change to the merge function(). The change I'm making doesn't matter because I haven't made it yet. ;) Right now I am settling for a println statement firing. I have two references to merge(). If I change the function to mergeBA...

Deny all access to files via http unless a certain condition is true

Hello, I am creating a PHP application and I'm having a bit of trouble finding a solution for a problem I'm having. I need to somehow completely deny access to anyone trying to access files on a web server (likely by returning a 403 Forbidden error or something) via HTTP unless a certain condition is true, such condition would be checked...

I have set php-mysql-apache to work on latin1 but when doing back-ups my character-set client is still utf8

Yes, I know what you think, but for the moment we decided to go for latin1. This is the mySQL config: • mysql> SHOW VARIABLES LIKE 'character_set_%'; • +--------------------------+--------+ • | Variable_name | Value | • +--------------------------+--------+ • | character_set_client | latin1 | • | character_se...

[Apache] Use user-environment variable in apache

I create svn config file, use apache as: <Location /svn/myproject> SVNPath D:\svnserver\projects\myproject\svn AuthzSVNAccessFile D:\svnserver\projects\myproject\conf\access.conf Include D:\svnserver\projects\myproject\conf\require_users </Location> But root-path is repeated so much. I want to set path as environment variable t...

777 permissions for public_html - Internal Server Error on some servers, but not others?

I have a few different servers, and on some servers, I can chmod the public_html folder to 777 permissions without problems - but on other servers, I get error messages. When trying to access the domain I get an Internal Server Error, and in my cpanel error_log on one server I get messages like the following: Fri Oct 08 09:55:39 2010] [...

.htaccess how to substitute urls

How can I substitute URLs of a web application in a sub folder as installed on root. e.g. need to map example.com/index.php to example.com/new/index.php I do not want redirection but url rewrite to exempt folder name. Help me to learn and define rules. ...

Apache and mod_proxy not handling HTTP 100-continue from client HTTP 417

'm building some webby magic and am using Apache to front our tomcat server, forwarding requests to tomcat on port 8080. I have an issue using Apache and mod_proxy to forward requests. It appears the client (a web application) sends an HTTP 100-continue to which Apache responds with a 417 Expectation Failed. When I take Apache out of th...

Multiple fullstops in regex for RewriteRule

I use the following rule to redirect pretty urls from http://hostname.co.za/geoip/123.12.123.34 to http://hostname.co.za/geoip/index.py?ip=123.12.123.34 .htaccess in /geoip RewriteEngine on RewriteRule ^(.*\..*\..*\..*)$ /geoip/index.py?ip=$1 This works fine to match only ip's, but when I try this, it gives a 500 server error: Rewri...

Php requests through proxy

Hi, I have local apache server, and I need to pass all requests from php script (running on my local server) through a proxy. So I need to se a proxy to apache/php. Is it doable ? Can somebody tell me how ? Thanks. ...

Premature end of script headers: Internal Server Error in PHP Apache webServer

Getting Internal Server Error in Godaddy Server lately. I change the timelimit and memorylimit and upload the php5.ini to the root directory in server. But still i get this error. Please help. ...

ExpiresActive On .htaccess explanation

[i]ExpiresActive On ExpiresByType image/gif A2592000 ExpiresByType image/jpeg A2592000 ExpiresByType image/png A2592000 BrowserMatch "MSIE" brokenvary=1 BrowserMatch "Mozilla/4.[0-9]{2}" brokenvary=1 BrowserMatch "Opera" !brokenvary SetEnvIf brokenvary 1 force-no-vary[/i] saw this code in a sample .htaccess recently. Presumably Expire...

Create Addon Domains from PHP

I have a VPS (CentOS) with CPanel and Suphp enabled. Apache/2.0.63 (Unix) mod_ssl/2.0.63 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 mod_fcgid/2.3.5 As a root I created an account and set up a domain for it. Now I can login to this account's CPanel and create addon domains. For my project I ...

.htaccess questions giving multiple parameters

i want to do /par/par/par now i do it with the following function but i would like to know if this is possible in .htaccess function exploder($data) { $parameters = explode('/',$data['id']); return $parameters; } and the amount of parameters should be variable the result are something like this url/par1/par2/par3 this coul...

Setting Python Path in Windows XAMPP using WSGI

I'm setting up a development version of a live server on Webfaction, running Django apps in a virtual Apache server environment (running without any errors) on my local machine - XP, running XAMPP Lite with Python 2.6 - which I can commit changes from via Git. XAMPP is up and running OK with Python, and the server starts perfectly with ...

How to change/add ports in apache2, in debian?

My OS: Linux version 2.6.26-2-xen-686 (Debian 2.6.26-25lenny1) ([email protected]) (gcc version 4.1.3 20080704 (prerelease) (Debian 4.1.2-25)) #1 SMP Fri Sep 17 00:54:08 UTC 2010 On my VPS, I need to use both php and ruby. So I want to use apache to handle my php sites and nginx for the ruby sites. And pass the php request to apache thro...

Serving files with naming conflicts

I'm trying to duplicate something that's being done on a website that seems a bit weird. They are serving both h**p://site.com/script.php AND h**p://site.com/script.php/file1 This doesn't seem to make any sense to me. script.php is clearly a PHP file that will get interpreted and have its output returned. file1 seems lik...