Is it possible that mod_vhost_alias can read several directories (For example, each users) to find the sites? Like in a hosting setup where different users can create the directories in their home directory?
I have this rule:
RewriteCond %{REQUEST_URI} ^/(manhattan|queens|westchester|new-jersey|bronx|brooklyn)-apartments/.*$
RewriteCond %{REQUEST_URI} !^/guide/(.*)$
RewriteRule ^(.*)$ /home/neezer/public-html/domain.com/guide/$1 [L]
Which works great on it's own. Essentially, I have a bunch of directories that have a bunch of files in them that I…
I looked at the other answers and those solutions did not help.
I am completely confused how to do this. I know almost nothing about apache nor how to use it and nearly all the article say write this but doesnt tell me where.
So far i have done this
# a2enmod deflate
Module deflate already enabled
Then i tried writing this in httpd.conf
…
I have an EasyPHP 12.1 setup (latest) on Windows 7x64 and I'm trying to enable mod_fcgid for PHP. I have added the following in my httpd.conf
Include conf/extra/httpd-vhosts.conf
LoadModule fcgid_module modules/mod_fcgid.so
FcgidInitialEnv PHPRC "C:\progra~2\EasyPHP-12.1\php\php546x121028092509"
AddHandler fcgid-script .php
FcgidWrapper…
The WordPress .htaccess generally has the following rewrite rules:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
When I access a non-existent URL at my website, this rewrite rule gets…
I run two virtual web servers (both running apache2 on debian). I have just one external IP, but two domains, and I want a domain going to each of the servers.
I've understood that I need a Reverse Proxy, and I enabled both the mod_proxy and the mod_proxy_http modules on the "primary server". Do I need to enable anything on the…
Hey everyone,
Just moved to shared hosting on GoDaddy and Im trying to get my .htaccess rules working.
Heres what I have:
ErrorDocument 404 /error.php
Options FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^www\.mydomain\.org$
RewriteRule ^(.*)$ http://mydomain.org/$1 [R=301,L]
RewriteRule…
I've seen this previous question on ServerFault, and I want something similar, but I'm not sure how to accomplish it.
What I want is to remove all slashes from the permalink except for the one that goes after the domain name. For example:
http://www.muycomputerpro.com/Actualidad/Especiales/La-Ciudad-Eficiente-Netapp…
I'm trying to force caching of a very obnoxious piece of PHP script which actively tries to resist caching for no good reason by actively setting all the anti-cache headers:
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Content-Type: text/html; charset=UTF-8
Date: Thu, 22 May…
Hi there,
We have a company server with a variety of websites. They are maintained by different people from within our company. All websites are public. The server access is limited to our company only. This is NOT a shared hosting environment.
We are looking into securing the server, currently analyzing the risk…
I have a web server with several virtual hosts. Some of those hosts have an associated ssl site. I have a DirectoryMatch directive in my main config file which requires basic authentication to any directory with secured as part of the directory path. On sites that have an SSL site, I have a rewrite rule (located in…
This is what I have so far but I can't get the RewriteCond and RewriteRule properly.
RewriteEngine On
RewriteCond %{LA-U:REMOTE_USER} (\d{3})$
RewriteRule !^%1 http://subdomain.mydomain.com/%1 [R,L].
AuthName "My Domain Protected Area"
AuthType Basic
AuthUserFile /path/to/my/.htpasswd
Require valid-user
This…
I'm rewriting query strings to pretty URIs, example: index.php?q=/en/contact becomes /en/contact and all works nicely..
# httpd.conf
# HANDLE THE QUERY
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
Is it even possible to rewrite single queries…
I have installed the mod_pagepseed module for Apache.
I am using Debian so I downloaded the .deb file, and installed it successfully. I then configured some filters, and it worked like a charm for some minutes.
Then after something like 10 minutes, my website no longer responded to the requests. When I was…
I have the following statements in an .htaccess file
RewriteCond %{HTTP_HOST} ^myOldDomain\.com$ [NC]
RewriteRule ^(.*)$ https://myNewDomaink.com/$1 [R=301,L]
It works fine. I basically found some sample code and modified it to my specific purpose. What I don't quite understand is:
Why does $1 refer to…
One of the clients that I maintain requests a website redesign, we do all the work in a subfolder /newsite/ and they intend to make it live this instant. The /newsite/ is made in wordpress and from my understanding WP keeps all the URL's as they were initially created. Would it be easier to just create the…
I'm trying to create a rule using Chinese characters
#RewriteRule ^zh(.*) /???$1 [L,R=301]
creates error 500 when i change the file to UTF-8
#RewriteRule ^zh(.*) /%E4%B8%AD%E6%96%87%E7%89%88$1 [L,R=301]
redirects to /%25E4%25B8%25AD%25E6%2596%2587%25E7%2589%2588 (basically replacing % with %25)
…
Here is my rule:
RewriteRule ^user/(\d+)$ rewrite.php?id=$1
This redirects, but $_GET['id'] is not set. If I change the above rule to:
RewriteRule ^anything/(\d+)$ rewrite.php?id=$1
It works. Why does one work but not the other?
Here is more information:
There is no directory named user
The…
Is it possible to enable the UserDir Directive for just one VirtualHost rather than have it on for all and then disable it (with "UserDir disable") for each VirtualHost you don't want it on?
I have tried by putting this inside a <VirtualHost> and comment out everything in the global config…
I have a VirtualHost that I'd like to have several subdomains on. (For the sake of clarity, let's say my domain is example.com and I'm just trying to get started by making foo.example.com work, and build from there.)
The simplest way I found for a subdomain to work non-invasively with the…
I have a website with domain mysite.com. I would like to have it so that if a user types in "mysite.com" it will redirect to "www.mysite.com". Additionally, "mysite.com/subdir" will also redirect to "www.mysite.com/subdir". I've looked and made changes with vhosts and also rewrites, but…
I need an .htaccess placed in example.com/mydir/ that rewrite (without redirect) all url in /mydir/(.*) to /mydir/index.php?var=$1. If an url is to an exist path or file it's not relevant for me (it must be rewrite).
I can't use +FollowSymLinks, but SymLinksIfOwnerMatch.
Thanks.
Hello, I am trying to use my Tomcat application (deployed at ROOT) to be viewed from Apache port 80. To do this, I used mod_proxy, since mod_jk made me try harder.
I used sth like this in httpd.conf:
<location http://www.example.com>
Order deny,allow
Allow from all
…
I have a site http://social.openitup.in
right now what you are seeing is a default Tomcat6 page.
I am using mod_ajp as a front end and Apache vhost configuration for same is
<VirtualHost *:80 >
ServerName social.openitup.in
ServerAdmin webmaster@localhost
…
I am new here. This is my situation. I am using nodejs modules, serialport2 and socket.io, because I am trying to forward the data from my arduino hardware through serialports. In my server side script, I read the data then forward it to the client side.
Now I am using Apache to…