12

You can use https://www.enjen.net/asn-blocklist/ An example i.e. colocrossing: https://www.enjen.net/asn-blocklist/index.php?asn=AS36352&type=htaccess If you need to download it to a server and don't want html then add &api=1 to the end of the link.


10

Easy! Just use the Apache IndexOptions directive in addition to Options +Indexes in the .htaccess file. In your case this would be simple enough to show the full names of files: Options +Indexes <IfModule mod_autoindex.c> IndexOptions NameWidth=* </ifModule> The key for you is the NameWidth value which when set to a wildcard value of * will ...


9

You can use this software : http://www.helicontech.com/ape/ Helicon Ape provides support for Apache .htaccess and .htpasswd configuration files in Microsoft IIS. It literally implements Apache configuration model and nearly all Apache modules in a single IIS add-on, not only making IIS compatible with Apache, but also extending it`s functionality ...


8

I wasn't sure exactly how to work this out. A little more searching and I dug up exactly what I was looking for. Notepad++ Apache httpd.conf .htaccess Syntax Highlighting Download http://notepad-plus.sourceforge.net/commun/userDefinedLang/userDefineLang_Apache2.xml View > User Defined Dialogue > [ Import ] http://weblogs.asp.net/jgalloway/archive/2006/...


8

In IIS (Internet Information Server) the equivalent of .htaccess is web.config You can read more about Web.config Here and Here And some htaccess to web.config converting tools here and here


5

Check out mod_asn: mod_asn is an Apache module that uses BGP routing data to look up the autonomous system (AS) and the network prefix (subnet) which contains a given (clients) IP address. mod_asn is usable as standalone module, and the lookup result can be used by scripts or other Apache modules. For instance, a download redirector could base its ...


5

You get the tool for creating or changing your language from View -> User Define Dialog It looks like the documentation you are linking to is out of date. It is now under the "Language" menu item. In my version of Notepad v6.7.7 you need to: Goto menu "Language" > "Define your language..." You will then see the "User Defined Language" dialog. Click "...


4

To redirect to HTTPS: RewriteEngine On RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} But you need to have a virtual host for ssl: NameVirtualHost *:443 <VirtualHost *:443> ServerName example.com ServerAlias www.example.com SSLEngine on SSLCertificateFile /etc/apache2/ssl/apache.crt ...


4

You can check the HTTP referer header in .htaccess. The referer indicates the address of the web page that linked to the resource being fetched - so you could check that the referer points to a page on the right domain. For details, see e.g. this question: control apache referrer to restrict downloads in htaccess file Warning: This is easy to circumvent ...


4

Your file should be named: robots.txt If you can see the content of the file on line : http://youwebsite/robots.txt, then it should be working. Otherwise you can test it with this google tool: https://support.google.com/webmasters/answer/6062598?hl=en


3

Can it go anywhere in the file? Yes and no. In general, if you have added it to the end of the file, it should be fine. But the reason I say “yes and no” is without knowing the rest of the contents of the .htaccess file it’s impossible to give a definite answer. For all I know you have other allow/deny directives that might interfere with this one. Do I ...


3

RewriteEngine On RewriteCond %{SERVER_PORT} 12495 RewriteCond %{REQUEST_URI} ^/announce RewriteRule (.*) http://tracker.niresh.co/announce.php


2

Instead of changing the directive in the default block you should use a separate block specifically for your project directory: <Directory /var/www/html/project1> Options Indexes FollowSymLinks AllowOverride All Order allow,deny allow from all Require all granted </Directory> This will only allow .htaccess files to be used in this ...


2

JPEG images are already compressed; any attempt to compress further with Zip, LHA or other tool rarely is of use. There are two ways to reduce the file size, both of which can be applied at the same time: Reduce the image size, e.g. scale down from 1024x768 to 800x600 pixels. Reduce the image quality. JPEG uses a lossy but fast compression scheme. If an ...


2

The file format is exactly the same, except as httpd.conf is global, you should put these settings within the apropriate <VirtualHost…> block (and possibly even within a <Path> or <Directory> block to improve performance, as FilesMatch is comparatively slow). For example: <VirtualHost *:443> ServerName … OtherSettings … &...


2

HTTP to HTTPS: server { listen 80; server_name *; location / { return 302 https://$host$request_uri; } } Non-WWW to WWW: server { server_name domain-without-www.com; listen 443 ssl; location / { return 302 https://www.$host$request_uri; } } Make sure to ...


2

I would argue you should put your new .htaccess file in public_html folder. Try the following with mod_rewrite in your .htaccess file RewriteEngine On # This will enable the Rewrite capabilities RewriteCond %{HTTPS} !=on # This checks to make sure the connection is not already HTTPS RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L] # This rule will ...


2

I've found the answer here https://httpd.apache.org/docs/2.4/mod/mod_authz_host.html Instead of Require not host domain.tld It will stop attempting dual reverse lookups with Require not forward-dns domain.tld The reason for that is explained here https://httpd.apache.org/docs/2.4/mod/core.html#hostnamelookups


2

Features like password-protected access (e.g. via .htaccess) and URL rewriting (e.g. stripping out .html from the path) require a web server. I assume that this is what you mean by “online”. You need to set up a web server that serves your files via the network, rather than just opening the HTML files from your PC directly from a browser. So, rather than ...


1

I want it to feel like that user hasn't redirected anywhere from example.com. Can I assign same domains to multiple servers? But it's not the same domain. The subdomain is completely independent in terms of where it points (and doesn't inherit anything from its parent domain). So the answer is yes, you can do that, and you do not need to do anything ...


1

Your solution is sound. As appleodity said, you could also use a firewall (but in this case your solution is better because it will have more accurate logging). You might want to couple this with fail2ban which monitors log files and can be used to email you and/or implement a firewall block on multiple attempts from the same IP.


1

This was answered over at Stack Overflow: https://stackoverflow.com/questions/23027847/htaccess-specific-url-to-different-port I'm going to modify the answer to fit your situation. It says "CONDITION: If not 443 then rewrite to https. This should strip out that port data. Your previous condition was protocol based and not port based. # redirect to ...


1

You don't need to redirect, if you only serve content from localserver.dyndns.com under portal.example.com, and want to use portal.example.com as URL. Create a DNS record for portal.example.com, as CNAME with value localserver.dyndns.com. It will point portal.domain.com to whatever is the current IP of localserver.dyndns.com, and will not rewrite URL.


1

TLDR; command to restart apache in your case is kill -USR1 1 Few things needs to be cleared here: Your docker image is running apache directly using CMD. this means apache main process will always have PID=1, and you are not using init system. You are trying to restart apache by using service command which relies on init system. Doh Alternative way of ...


1

Apache will search recursively up the tree for .htaccess files, on every access, which is why .htaccess files (i.e. anything besides AllowOverride none) is a bad idea if you want high performance. If you can, put the directives in the config itself and turn off AllowOverride. Perhaps Adding a <Directory> segment with AllowOverride none for the parent ...


1

So, you have two options. First, I would encourage you to just load the mod_deflate module. Add the following line to your httpd.conf file. LoadModule deflate_module modules/mod_deflate.so Otherwise, there is an alternative - mod_gzip. It is a an external extension that you'll have to download the source code, compile, and load using a line in your ...


1

There is a Chrome extension that will allow you to imitate different user agents (including Firefox 27). https://chrome.google.com/webstore/detail/user-agent-switcher/lkmofgnohbedopheiphabfhfjgkhfcgf?hl=en-US Follow these steps: Copy the user-agent string in this textbox... ...reopen the extension and paste that user-agent string into this textbox; then ...


1

I had a similar problem and replaced Options MultiViews with Options -MultiViews Actually I ended up with Options +Indexes +FollowSymLinks -MultiViews I found that solution here: https://velenux.wordpress.com/2012/07/17/apache-mod_rewrite-multiple-add-path-info-postfix/


1

No, that would only match xxx.xxx.128 xxx.xxx.129 xxx.xxx.138 xxx.xxx.139 xxx.xxx.148 xxx.xxx.149 xxx.xxx.158 xxx.xxx.159 What you want (if regexes is even the right tool; I'm not sure if there is a better way to match on netmasks that works here) would be ^xxx\.xxx\.1(2[89]|[3-5][0-9]) The parenthesised part matches either 2 followed by 8 or 9, or 3, 4, ...


1

Your problem is this part of the site: <script type="text/javascript">var src="http://www.awesomeweb.com/wp-admin/admin-ajax.php?action=wordfence_logHuman&hid=CE14A685241DC966F0C8BAAC20710796"; if(window.location.protocol == "https:"){ src = src.replace("http:", "https:"); } var wfHTImg = new Image(); wfHTImg.src=src;</script> I do not ...


Only top voted, non community-wiki answers of a minimum length are eligible