Dot HTAccesser – .htaccess file generator
Sometimes it’s easier online
Dot Htaccesser simplifies the process of creating Apache .htaccess files. Users fill in the HTML form for the configuration desired, and it generates the .htaccess file syntax.
It handles options (execCGI, includes, MultiView, etc.), authentication files, IP address blocking, custom MIME types, and error documents. This complex htaccess generator will make your live much more simple.
[sociallocker id=”1603″]
“;
$output.=”\norder allow,deny\ndeny from all\n”;
}
if (isset($redirect)) {
$output.=”\nRedirect permanent /$redirect_file $redirect_url”;
}
if (isset($force_ssl))
{
$output.=”\n”;
$output.=”\nRedirect permanent / https://$force_ssl_domain/”;
$output.=”\n”;
}
if (isset($no_index)) {
$output.=”\nIndexIgnore */*”;
}
if (isset($cache))
{
$output.=”\nExpiresActive on\nExpiresDefault “;
if (isset($cache_server))
{ $output.=”M”; }
else
{ $output.=”A”; }
$output.=$cachelength;
}
if (isset($check_media_referrer)) { $modrewrite=”true”; }
if (isset($failed_redirect)) { $modrewrite=”true”; }
if (isset($user_dir)) { $modrewrite=”true”; }
if (isset($timed_pages)) { $modrewrite=”true”; }
if (isset($block_harvesters)) { $modrewrite=”true”; }
if (isset($rewrite_browser_page)) { $modrewrite=”true”; }
if (isset($remap_script)&&isset($remap_folder)) { $modrewrite=”true”; }
if (isset($modrewrite)&&($modrewrite!=”false”))
{
$output.=”\nRewriteEngine on”;
if (isset($check_media_referrer)) {
$output.=”\n”.’RewriteCond %{HTTP_REFERER} !^$’;
$output.=”\n”.’RewriteCond %{HTTP_REFERER} !^http://(www\.)?’.$referrer_domain.’/.*$ [NC]’;
$output.=”\n”.’RewriteRule \.(gif|jpg|png|mp3|mpg|avi|mov)$ – [F] ‘;
}
if (isset($failed_redirect))
{
$output.=”\n”.’RewriteCond %{REQUEST_URI} !-U’;
$output.=”\n”.’RewriteRule ^(.+) http://’.$failed_redirect_server.’/$1′;
}
if (isset($user_dir)) {
$user_domain=str_replace(‘.’,’\.’,$user_domain);
$output.=”\n”.’RewriteCond %{HTTP_HOST} ^www\.[^.]+\.’.$user_domain.’$’;
$output.=”\n”.’RewriteRule ^(.+) %{HTTP_HOST}$1 [C]’;
$output.=”\n”.’RewriteRule ^www\.([^.]+)\.’.$user_domain.'(.*) /’.$user_dir_path.’$1$2′;
}
if (isset($timed_pages))
{
$timed_page=str_replace(‘.’,’\.’,$timed_page);
$output.=”\n”.’RewriteCond %{TIME_HOUR}%{TIME_MIN} >’.$timed_page_start;
$output.=”\n”.’RewriteCond %{TIME_HOUR}%{TIME_MIN} <‘.$timed_page_end; $output.=”\n”.’RewriteRule ^’.$timed_page.’$ ‘.$timed_page_day; $output.=”\n”.’RewriteRule ^’.$timed_page.’$ ‘.$timed_page_night; } if (isset($block_harvesters)) { $output.=”\nRewriteCond %{HTTP_USER_AGENT} Wget [OR] “; $output.=”\nRewriteCond %{HTTP_USER_AGENT} CherryPickerSE [OR] “; $output.=”\nRewriteCond %{HTTP_USER_AGENT} CherryPickerElite [OR] “; $output.=”\nRewriteCond %{HTTP_USER_AGENT} EmailCollector [OR] “; $output.=”\nRewriteCond %{HTTP_USER_AGENT} EmailSiphon [OR] “; $output.=”\nRewriteCond %{HTTP_USER_AGENT} EmailWolf [OR] “; $output.=”\nRewriteCond %{HTTP_USER_AGENT} ExtractorPro “; $output.=”\nRewriteRule ^.*$ $block_doc [L]”; } if (isset($rewrite_browser_page)) { //rewrite browser pages $rw_page=’^’.str_replace(‘.’,’\.’,$rewrite_browser_page).’$’; if (isset($geoip_country)) { $output.=”\nRewriteCond %{ENV:GEOIP_COUNTRY_CODE} $geoip_country [NC]”; $output.=”\nRewriteRule $rw_page $geoip_page [L]\n”; } if (isset($rewrite_browser_page_ns)) { $output.=”\n”.’RewriteCond %{HTTP_USER_AGENT} ^Mozilla/[345].*Gecko*’; $output.=”\nRewriteRule $rw_page $rewrite_browser_page_ns [L]\n”; } if (isset($rewrite_browser_page_ie)) { $output.=”\n”.’RewriteCond %{HTTP_USER_AGENT} ^Mozilla/[345].*MSIE*’; $output.=”\nRewriteRule $rw_page $rewrite_browser_page_ie [L]\n”; } if (isset($rewrite_browser_page_lynx)) { $output.=”\n”.’RewriteCond %{HTTP_USER_AGENT} ^Mozilla/[12].* [OR]’; $output.=”\n”.’RewriteCond %{HTTP_USER_AGENT} ^Lynx/*’; $output.=”\nRewriteRule $rw_page $rewrite_browser_page_lynx [L]\n”; } if (isset($rewrite_browser_page_default)) { $output.=”\nRewriteRule $rw_page $rewrite_browser_page_default [L]\n”; } } if (isset($remap_script)&&isset($remap_folder)) { $output.=”\nRewriteRule $remap_folder(.*) /$remap_script$1 [PT]”; } } if (isset($error_400)) { $output.=”\nErrorDocument 400 $error_400″; } if (isset($error_401)) { $output.=”\nErrorDocument 401 $error_401″; } if (isset($error_403)) { $output.=”\nErrorDocument 403 $error_403″; } if (isset($error_404)) { $output.=”\nErrorDocument 404 $error_404″; } if (isset($error_500)) { $output.=”\nErrorDocument 500 $error_500″; } if (isset($default_page)) { $output.=”\nDirectoryIndex $default_page”; } if ($options) { $output=”Options $options\n”.$output; } ?>
Your .htaccess file contents
Copy the lines below and paste them into your .htaccess file
.
[/sociallocker]
|