<?xml version="1.0" encoding="UTF-8"?> <rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
><channel><title>FAQforge &#187; apache</title> <atom:link href="http://www.faqforge.com/tag/apache/feed/" rel="self" type="application/rss+xml" /><link>http://www.faqforge.com</link> <description>Just another WordPress weblog</description> <lastBuildDate>Fri, 03 Feb 2012 13:47:23 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <item><title>Apache mod-security installation on Debian 6.0 (squeeze)</title><link>http://www.faqforge.com/linux/apache-mod-security-installation-on-debian-6-0-squeeze/</link> <comments>http://www.faqforge.com/linux/apache-mod-security-installation-on-debian-6-0-squeeze/#comments</comments> <pubDate>Mon, 02 Jan 2012 11:20:06 +0000</pubDate> <dc:creator>Till</dc:creator> <category><![CDATA[Controlpanels]]></category> <category><![CDATA[Debian]]></category> <category><![CDATA[Distributions]]></category> <category><![CDATA[ISPConfig 3]]></category> <category><![CDATA[Linux & Unix]]></category> <category><![CDATA[Server]]></category> <category><![CDATA[Webserver]]></category> <category><![CDATA[apache]]></category> <category><![CDATA[squeeze]]></category><guid
isPermaLink="false">http://www.faqforge.com/?p=1486</guid> <description><![CDATA[Install the apache mod-security 2 module with apt from the Debian repositories apt-get install libapache-mod-security Create the folder for the mod-security configuration files mkdir /etc/apache2/mod-security chmod 600 /etc/apache2/mod-security Download and unpack the mod-security rules cd /tmp wget http://www.modsecurity.org/download/modsecurity-core-rules_2.5-1.6.1.tar.gz tar fvx modsecurity-core-rules_2.5-1.6.1.tar.gz mv *.conf /etc/apache2/mod-security/ ln -s /var/log/apache2 /etc/apache2/logs Configure apache to load the activated mod-security [...]]]></description> <content:encoded><![CDATA[<p>Install the apache mod-security 2 module with apt from the Debian repositories</p><p
class="command">apt-get install libapache-mod-security</p><p>Create the folder for the mod-security configuration files</p><p
class="command">mkdir /etc/apache2/mod-security<br
/> chmod 600 /etc/apache2/mod-security</p><p>Download and unpack the mod-security rules</p><p
class="command">cd /tmp<br
/> wget http://www.modsecurity.org/download/modsecurity-core-rules_2.5-1.6.1.tar.gz<br
/> tar fvx modsecurity-core-rules_2.5-1.6.1.tar.gz<br
/> mv *.conf /etc/apache2/mod-security/<br
/> ln -s /var/log/apache2 /etc/apache2/logs</p><p>Configure apache to load the activated mod-security rules</p><p
class="command">vi /etc/apache2/conf.d/mod-security.conf</p><p><span
class="system">Include /etc/apache2/mod-security/*.conf</span></p><p>To enable mod-security, edit the file</p><p
class="command">vi /etc/apache2/mod-security/modsecurity_crs_10_config.conf</p><p>and remove the # in front of the line:</p><p
class="system">SecDefaultAction &#8220;phase:2,log,deny,status:403,t:lowercase,t:replaceNulls,t:compressWhitespace&#8221;</p><p>Then reload apache.</p><p
class="command">/etc/init.d/apache2 force-reload</p><p>Mod security will now start to block hack attempts to your websites and log the actions in the file /var/log/apache2/modsec_audit.log.</p><p
class="command">tail /var/log/apache2/modsec_audit.log</p><p>You will see very likely some falsely blocked URL&#8217;s. To whitelist them, you can add the ID&#8217;s of the rules that should not be used in the whitelist file.</p><p>Example:</p><p
class="command">vi /etc/apache2/mod-security/modsecurity_crs_99_whitelist.conf</p><p
class="system">SecRuleRemoveById 960015<br
/> SecRuleRemoveById 960016</p> ]]></content:encoded> <wfw:commentRss>http://www.faqforge.com/linux/apache-mod-security-installation-on-debian-6-0-squeeze/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Webalizer: Error Opening file /usr/share/GeoIP/GeoIP.dat on Debian Linux</title><link>http://www.faqforge.com/linux/webalizer-error-opening-file-usrsharegeoipgeoip-dat-on-debian-linux/</link> <comments>http://www.faqforge.com/linux/webalizer-error-opening-file-usrsharegeoipgeoip-dat-on-debian-linux/#comments</comments> <pubDate>Tue, 25 Oct 2011 14:06:44 +0000</pubDate> <dc:creator>Till</dc:creator> <category><![CDATA[Controlpanels]]></category> <category><![CDATA[ISPConfig 2]]></category> <category><![CDATA[ISPConfig 3]]></category> <category><![CDATA[Linux & Unix]]></category> <category><![CDATA[Server]]></category> <category><![CDATA[Webserver]]></category> <category><![CDATA[apache]]></category> <category><![CDATA[Debian]]></category> <category><![CDATA[webalizer]]></category><guid
isPermaLink="false">http://www.faqforge.com/?p=1030</guid> <description><![CDATA[The webalizer package in Debain 6 has currently small bug as the required package for the  GeoIP database is not installed automatically when webalizer is isntalled. The symptoms are that webalizer statistics are not created and this error message is displayed when webalizer is run: Error Opening file /usr/share/GeoIP/GeoIP.dat The solution is to install the [...]]]></description> <content:encoded><![CDATA[<p>The webalizer package in Debain 6 has currently small bug as the required package for the  GeoIP database is not installed automatically when webalizer is isntalled. The symptoms are that webalizer statistics are not created and this error message is displayed when webalizer is run:</p><p
class="system">Error Opening file /usr/share/GeoIP/GeoIP.dat</p><p>The solution is to install the missing package manually:</p><p
class="command">apt-get install geoip-database</p> ]]></content:encoded> <wfw:commentRss>http://www.faqforge.com/linux/webalizer-error-opening-file-usrsharegeoipgeoip-dat-on-debian-linux/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Redirect http requests to a new folder with apache rewrite rules</title><link>http://www.faqforge.com/linux/redirect-http-requests-to-a-new-folder-with-apache-rewrite-rules/</link> <comments>http://www.faqforge.com/linux/redirect-http-requests-to-a-new-folder-with-apache-rewrite-rules/#comments</comments> <pubDate>Fri, 12 Aug 2011 08:21:59 +0000</pubDate> <dc:creator>Till</dc:creator> <category><![CDATA[Linux & Unix]]></category> <category><![CDATA[Server]]></category> <category><![CDATA[Webserver]]></category> <category><![CDATA[apache]]></category> <category><![CDATA[rewriterule]]></category><guid
isPermaLink="false">http://www.faqforge.com/?p=598</guid> <description><![CDATA[When you reorganize the structure of a website, you might want to redirect requests to files in a old folder to a new one without loosing the pagerank. In this example, I will redirect all requests from directory &#8220;olddir&#8221; to directory &#8220;newdir&#8221;, so that requests like http://www.yourdomain.tld/olddir/page.htm get redirected to http://www.yourdomain.tld/newdir/page.htm without loosing the Google pagerank [...]]]></description> <content:encoded><![CDATA[<p>When you reorganize the structure of a website, you might want to redirect requests to files in a old folder to a new one without loosing the pagerank. In this example, I will redirect all requests from directory &#8220;olddir&#8221; to directory &#8220;newdir&#8221;, so that requests like http://www.yourdomain.tld/olddir/page.htm get redirected to http://www.yourdomain.tld/newdir/page.htm without loosing the Google pagerank of the pages.</p><p>The following rewrite rules can be added into a <span
class="system">.htaccess</span> file in the website directory or in the vhost configuration.</p><p
class="command">RewriteEngine on<br
/> RewriteRule ^olddir/(.*)$ newdir/$1 [R=301,L]</p><p>This rewrite rule redirects automatically all requests to pages or subdirectorys of &#8220;olddir&#8221; to the same page or subdirectory in &#8220;newdir&#8221;.</p> ]]></content:encoded> <wfw:commentRss>http://www.faqforge.com/linux/redirect-http-requests-to-a-new-folder-with-apache-rewrite-rules/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Prevent DOS attacks on apache webserver for DEBIAN linux with mod_evasive</title><link>http://www.faqforge.com/linux/prevent-dos-attacks-on-apache-webserver-for-debian-linux-with-mod_evasive/</link> <comments>http://www.faqforge.com/linux/prevent-dos-attacks-on-apache-webserver-for-debian-linux-with-mod_evasive/#comments</comments> <pubDate>Mon, 07 Mar 2011 13:23:21 +0000</pubDate> <dc:creator>Till</dc:creator> <category><![CDATA[Debian]]></category> <category><![CDATA[Distributions]]></category> <category><![CDATA[ISPConfig 2]]></category> <category><![CDATA[ISPConfig 3]]></category> <category><![CDATA[Linux & Unix]]></category> <category><![CDATA[Server]]></category> <category><![CDATA[Ubuntu]]></category> <category><![CDATA[Webserver]]></category> <category><![CDATA[apache]]></category><guid
isPermaLink="false">http://www.faqforge.com/?p=559</guid> <description><![CDATA[The following guide explains the installation of the apache module &#8220;mod_evasive&#8221;. Mod_evasive tracks the number of requests of files at the apache webserver and blocks the delivery in case that a certain limit has been reached. Installation apt-get install libapache2-mod-evasive Create the log directory for mod_evasive mkdir -p /var/log/apache2/evasive chown -R www-data:root /var/log/apache2/evasive Now we [...]]]></description> <content:encoded><![CDATA[<p>The following guide explains the installation of the apache module &#8220;mod_evasive&#8221;. Mod_evasive tracks the number of requests of files at the apache webserver and blocks the delivery in case that a certain limit has been reached.</p><p><strong>Installation</strong></p><p
class="command">apt-get install libapache2-mod-evasive</p><p>Create the log directory for mod_evasive</p><p
class="command">mkdir -p /var/log/apache2/evasive<br
/> chown -R www-data:root /var/log/apache2/evasive</p><p>Now we add the configuration for the module at the end of the file /etc/apache2/mods-available/mod-evasive.load</p><p
class="command">vi /etc/apache2/mods-available/mod-evasive.load</p><p>so that it looks like this:</p><p
class="command">LoadModule evasive20_module /usr/lib/apache2/modules/mod_evasive20.so<br
/> <IfModule
mod_evasive20.c><br
/> DOSHashTableSize 3097<br
/> DOSPageCount 2<br
/> DOSSiteCount 50<br
/> DOSPageInterval 5<br
/> DOSSiteInterval 1<br
/> DOSBlockingPeriod 10<br
/> DOSLogDir &#8220;/var/log/apache2/evasive&#8221;<br
/> </IfModule></p><p>and restart apache:</p><p
class="command">/etc/init.d/apache2 restart</p> ]]></content:encoded> <wfw:commentRss>http://www.faqforge.com/linux/prevent-dos-attacks-on-apache-webserver-for-debian-linux-with-mod_evasive/feed/</wfw:commentRss> <slash:comments>5</slash:comments> </item> <item><title>Apache webserver: redirect requests for domain.com to www.domain.com</title><link>http://www.faqforge.com/linux/controlpanels/apache-webserver-redirect-requests-for-domain-com-to-www-domain-com/</link> <comments>http://www.faqforge.com/linux/controlpanels/apache-webserver-redirect-requests-for-domain-com-to-www-domain-com/#comments</comments> <pubDate>Mon, 22 Mar 2010 13:24:53 +0000</pubDate> <dc:creator>Till</dc:creator> <category><![CDATA[Controlpanels]]></category> <category><![CDATA[ISPConfig 2]]></category> <category><![CDATA[ISPConfig 3]]></category> <category><![CDATA[Server]]></category> <category><![CDATA[Webserver]]></category> <category><![CDATA[apache]]></category><guid
isPermaLink="false">http://www.faqforge.com/?p=429</guid> <description><![CDATA[Many webmasters want to redirect users that access their websites with &#8220;domain.tld&#8221; automatically to &#8220;www.domain.tld&#8221;. If you use the Apache web server, you can do this by using Apache rewrite rules. Add a .htaccess file with the following content in the root directory of the website: RewriteEngine On RewriteCond %{HTTP_HOST} !^www\.domain\.com RewriteRule (.*) http://www.domain.com/$1 [L,R=301] [...]]]></description> <content:encoded><![CDATA[<p>Many webmasters want to redirect users that access their websites with &#8220;domain.tld&#8221; automatically to &#8220;www.domain.tld&#8221;. If you use the Apache web server, you can do this by using Apache rewrite rules.</p><p>Add a .htaccess file with the following content in the root directory of the website:</p><p
class="command">RewriteEngine On<br
/> RewriteCond %{HTTP_HOST} !^www\.domain\.com<br
/> RewriteRule (.*) http://www.domain.com/$1 [L,R=301]</p><p>If you use ISPConfig as hosting control panel, you can add these rules also in the Apache directives field of the website instead of a .htaccess file</p> ]]></content:encoded> <wfw:commentRss>http://www.faqforge.com/linux/controlpanels/apache-webserver-redirect-requests-for-domain-com-to-www-domain-com/feed/</wfw:commentRss> <slash:comments>5</slash:comments> </item> <item><title>Get a list of all virtual hosts which are defined in all apache configuration files</title><link>http://www.faqforge.com/linux/controlpanels/get-a-list-of-all-virtual-hosts-which-are-defined-in-all-apache-configuration-files/</link> <comments>http://www.faqforge.com/linux/controlpanels/get-a-list-of-all-virtual-hosts-which-are-defined-in-all-apache-configuration-files/#comments</comments> <pubDate>Thu, 11 Mar 2010 15:26:46 +0000</pubDate> <dc:creator>Till</dc:creator> <category><![CDATA[Basics]]></category> <category><![CDATA[Controlpanels]]></category> <category><![CDATA[Debian]]></category> <category><![CDATA[Distributions]]></category> <category><![CDATA[ISPConfig 2]]></category> <category><![CDATA[ISPConfig 3]]></category> <category><![CDATA[Ubuntu]]></category> <category><![CDATA[Webserver]]></category> <category><![CDATA[apache]]></category><guid
isPermaLink="false">http://www.faqforge.com/?p=421</guid> <description><![CDATA[Have you ever searched where the virtual host of a website is defined in the apache config files? There is a handy option of the apache2ctl script which might help then. When you run the command: apache2ctl -S on the shell, you will get a list of all virtual hosts and default servers incl. the [...]]]></description> <content:encoded><![CDATA[<p>Have you ever searched where the virtual host of a website is defined in the apache config files? There is a handy option of the apache2ctl script which might help then. When you run the command:</p><p
class="command">apache2ctl -S</p><p>on the shell, you will get a list of all virtual hosts and default servers incl. the line number where it is defined. Example:</p><p
class="system">~# apache2ctl -S<br
/> VirtualHost configuration:<br
/> wildcard NameVirtualHosts and _default_ servers:<br
/> *:8080                 is a NameVirtualHost<br
/> default server ispconfig.local (/etc/apache2/sites-enabled/000-ispconfig.vhost:10)<br
/> port 8080 namevhost ispconfig.local (/etc/apache2/sites-enabled/000-ispconfig.vhost:10)<br
/> *:8081                 is a NameVirtualHost<br
/> default server ispconfig.local (/etc/apache2/sites-enabled/000-apps.vhost:10)<br
/> port 8081 namevhost ispconfig.local (/etc/apache2/sites-enabled/000-apps.vhost:10)<br
/> *:80                   is a NameVirtualHost<br
/> default server ispconfig.local (/etc/apache2/sites-enabled/000-default:1)<br
/> port 80 namevhost ispconfig.local (/etc/apache2/sites-enabled/000-default:1)<br
/> port 80 namevhost example.com (/etc/apache2/sites-enabled/example.com.vhost:7)<br
/> Syntax OK</p><p>Thanks to <a
href="http://www.planetfox.de/" target="_blank">Planetfox</a> for this tipp.</p> ]]></content:encoded> <wfw:commentRss>http://www.faqforge.com/linux/controlpanels/get-a-list-of-all-virtual-hosts-which-are-defined-in-all-apache-configuration-files/feed/</wfw:commentRss> <slash:comments>3</slash:comments> </item> <item><title>How to disable Apache mod_security for a website in ISPConfig 3.</title><link>http://www.faqforge.com/linux/how-to-disable-apache-mod_security-for-a-website-in-ispconfig-3/</link> <comments>http://www.faqforge.com/linux/how-to-disable-apache-mod_security-for-a-website-in-ispconfig-3/#comments</comments> <pubDate>Wed, 10 Mar 2010 14:59:06 +0000</pubDate> <dc:creator>Till</dc:creator> <category><![CDATA[ISPConfig 3]]></category> <category><![CDATA[Linux & Unix]]></category> <category><![CDATA[Server]]></category> <category><![CDATA[Webserver]]></category> <category><![CDATA[apache]]></category><guid
isPermaLink="false">http://www.faqforge.com/?p=417</guid> <description><![CDATA[If you use mod_security on your server you might encounter that a website script is not compatible with mod_security. To disable mod_security (v2) for a website, add the following code into the apache directives field: SecRuleEngine Off For the older mod_security 1 version, use these configuration directives: SecFilterEngine Off Thanks to Planetfox for this tipp.]]></description> <content:encoded><![CDATA[<p>If you use mod_security on your server you might encounter that a website script is not compatible with mod_security. To disable mod_security (v2) for a website, add the following code into the apache directives field:</p><p
class="command"><IfModule
mod_security2.c><br
/> SecRuleEngine Off<br
/> </IfModule></p><p><a
href="http://www.faqforge.com/wp-content/uploads/2010/03/modsec_isp3.jpg"><img
class="aligncenter size-full wp-image-418" title="modsec_isp3" src="http://www.faqforge.com/wp-content/uploads/2010/03/modsec_isp3.jpg" alt="" width="436" height="386" /></a></p><p>For the older mod_security 1 version, use these configuration directives:</p><p
class="command"><IfModule
mod_security.c><br
/> SecFilterEngine Off<br
/> </IfModule></p><p>Thanks to <a
href="http://www.planetfox.de/" target="_blank">Planetfox</a> for this tipp.</p> ]]></content:encoded> <wfw:commentRss>http://www.faqforge.com/linux/how-to-disable-apache-mod_security-for-a-website-in-ispconfig-3/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>How to force caching headers with apache and squid reverse proxy</title><link>http://www.faqforge.com/linux/how-to-force-caching-headers-with-apache-and-squid-reverse-proxy/</link> <comments>http://www.faqforge.com/linux/how-to-force-caching-headers-with-apache-and-squid-reverse-proxy/#comments</comments> <pubDate>Tue, 02 Mar 2010 16:53:08 +0000</pubDate> <dc:creator>Till</dc:creator> <category><![CDATA[Linux & Unix]]></category> <category><![CDATA[Server]]></category> <category><![CDATA[Webserver]]></category> <category><![CDATA[apache]]></category><guid
isPermaLink="false">http://www.faqforge.com/?p=405</guid> <description><![CDATA[If you use a squid reverse proxy in front of your apache webserver to reduce the load, it might happen that pages are not cached correctly because the website script running on the apache webserver sends wrong caching headers. I had this problem with a wordpress install, wordpress had always send pragma no-cache headers with [...]]]></description> <content:encoded><![CDATA[<p>If you use a squid reverse proxy in front of your apache webserver to reduce the load, it might happen that pages are not cached correctly because the website script running on the apache webserver sends wrong caching headers. I had this problem with a wordpress install, wordpress had always send pragma no-cache headers with the pages so squid reported a cache miss for every page request. A simple solution for this is to use apache mod_headers to delete the no chache header and replace it with a header for 10 minute cache period.</p><p>First, ensure that mod_herders is enabled. To do this in Debian and Ubuntu, run the command:</p><p
class="command">a2enmod headers</p><p>Then create a .htaccess file in the website root directoyr which contains the following lines:</p><p
class="command">Header unset Pragma<br
/> Header set Cache-Control &#8220;must-revalidate, max-age=0, s-maxage=600&#8243;<br
/> Header set Vary &#8220;Accept-Encoding&#8221;</p> ]]></content:encoded> <wfw:commentRss>http://www.faqforge.com/linux/how-to-force-caching-headers-with-apache-and-squid-reverse-proxy/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>How to use a custom php.ini with suphp</title><link>http://www.faqforge.com/linux/controlpanels/ispconfig2/how-to-use-a-custom-php-ini-with-suphp/</link> <comments>http://www.faqforge.com/linux/controlpanels/ispconfig2/how-to-use-a-custom-php-ini-with-suphp/#comments</comments> <pubDate>Mon, 19 Oct 2009 14:45:37 +0000</pubDate> <dc:creator>Till</dc:creator> <category><![CDATA[Debian]]></category> <category><![CDATA[ISPConfig 2]]></category> <category><![CDATA[ISPConfig 3]]></category> <category><![CDATA[Ubuntu]]></category> <category><![CDATA[Webserver]]></category> <category><![CDATA[apache]]></category><guid
isPermaLink="false">http://www.faqforge.com/?p=243</guid> <description><![CDATA[To use a custom php.ini file with SuPHP for a website, you can define the path to the php.ini file in a .htaccess file or in the apache vhost like this: suPHP_ConfigPath /home/websites/domain.tld/ Then add a php.ini file in the directory /home/websites/domain.tld/ which may be a copy of the global php.ini were you just changed [...]]]></description> <content:encoded><![CDATA[<p>To use a custom php.ini file with SuPHP for a website, you can define the path to the php.ini file in a .htaccess file or in the apache vhost like this:</p><p
class="command">suPHP_ConfigPath /home/websites/domain.tld/</p><p>Then add a php.ini file in the directory /home/websites/domain.tld/ which may be a copy of the global php.ini were you just changed a few settings or an empty file were you add only the settings that shall be overridden in the global PHP configuration.</p><p>If you use ISPConfig 2 or 3, you can add the <span
class="system">suPHP_ConfigPath</span> setting also in the apache directives field of the website  in ISPConfig.</p> ]]></content:encoded> <wfw:commentRss>http://www.faqforge.com/linux/controlpanels/ispconfig2/how-to-use-a-custom-php-ini-with-suphp/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Redirect a subdomain with apache mod_rewrite and keep the URL in the address bar</title><link>http://www.faqforge.com/linux/redirect-a-subdomain-with-apache-mod_rewrite-and-keep-the-url-in-the-address-bar/</link> <comments>http://www.faqforge.com/linux/redirect-a-subdomain-with-apache-mod_rewrite-and-keep-the-url-in-the-address-bar/#comments</comments> <pubDate>Fri, 16 Oct 2009 09:11:09 +0000</pubDate> <dc:creator>Till</dc:creator> <category><![CDATA[Debian]]></category> <category><![CDATA[ISPConfig 2]]></category> <category><![CDATA[ISPConfig 3]]></category> <category><![CDATA[Linux & Unix]]></category> <category><![CDATA[Ubuntu]]></category> <category><![CDATA[Webserver]]></category> <category><![CDATA[apache]]></category><guid
isPermaLink="false">http://www.faqforge.com/?p=234</guid> <description><![CDATA[If you want to redirect a subdomain like sub.domain.tld into a subdirectory of the website and keep the original URL in the browser location bar, you may use the following apache directives. RewriteEngine on RewriteCond %{HTTP_HOST} ^sub.domain.tld [NC] RewriteRule ^/(.*)$ /sub/$1 [L] This rewrite rule can be added into a .htaccess file in the website [...]]]></description> <content:encoded><![CDATA[<p>If you want to redirect a subdomain like sub.domain.tld into a subdirectory of the website and keep the original URL in the browser location bar, you may use the following apache directives.</p><p
class="command">RewriteEngine on<br
/> RewriteCond %{HTTP_HOST}   ^sub.domain.tld [NC]<br
/> RewriteRule   ^/(.*)$ /sub/$1  [L]</p><p>This rewrite rule can be added into a .htaccess file in the website root or inside the vhost file. If you use ISPConfig 2 or 3, you can add this also into the apache directives field in the website settings.</p><p>Replace sub.domain.tld with the subdomain that shall be redirected and /sub/ with the path to the directory were the pages for this subdomain are located.</p> ]]></content:encoded> <wfw:commentRss>http://www.faqforge.com/linux/redirect-a-subdomain-with-apache-mod_rewrite-and-keep-the-url-in-the-address-bar/feed/</wfw:commentRss> <slash:comments>5</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced (User agent is rejected)
Database Caching 1/47 queries in 0.049 seconds using disk: basic
Object Caching 1518/1620 objects using disk: basic

Served from: www.faqforge.com @ 2012-02-05 00:12:22 -->
