Tag Info

Hot answers tagged

4

Assuming the HTTPD is apache: RewriteEngine on RewriteCond %{HTTP_HOST} ^demo\.* [NC] RewriteRule .* http://domain.com/ [L]


3

The second error message seems to squarely point to it being a file permissions problem so here's a quick test to see where the problem might be. First switch to the correct user that apache is running as. I'm assuming it's www-data, but it may also be either apache, www, or something else. To find out for sure, you can try running ps -ef | grep apache or ...


3

I suspect your VirtualHost is not getting processed correctly, which would then not set AllowOverride for the get requests. First your /etc/hosts file should look like this.. 127.0.0.1 localhost localhost.localdomain 127.0.1.1 nibble.local Second, You must have that interface set for namebased vhosts. You did not specify if you have it currently ...


2

HTTP is stateless; cookies are used by web pages not by web servers. When your browser makes a request to such a page, it gets back an error response saying authentication is needed. Then, it'll prompt you for your user name and password, store that in memory, and then make the request again. From there on, every request that your browser makes to that ...


2

I believe you can drop this into an .htaccess where ever you don't want to allow scripts to execute: <Files *.*> Options -ExecCGI </Files> If you know all the "bad" files are named a certain way you could also disable their being associated to a given handler with this: <Files *.*> RemoveHandler cgi-script .php .pl .py .jsp .asp .htm ...


2

Are you by any chance missing a / in your RewriteRule ^0.02/ping/$, between ^ and 0.02/ping/? What would happen if you remove ^ or replace it with a ^/?


2

I have no history or knowledge how the .htpasswd file was created. You're probably looking for the htpasswd command. Read the man page for more details: man htpasswd How may I distinguish which encryption my .htpasswd file uses? Why do you need to know that? I don't think it's important to know that if you just want to edit the file. I'm ...


2

This is one possibility using the mod_rewrite: RewriteEngine On RewriteCond %{HTTP_REFERER} ^http://graymind.ir/.* [NC] RewriteRule .* - [F] Basically it's checking if the referer starts with http://graymind.ir/ (non case sensitive), if so then it just rewrites any URL to a 403 Forbidden


1

You can use the following Rewrite Rule: RewriteRule r.info\/blogs\/st\/?(.*)$ r.info/blogs/th/st/$1 [L] Make sure no rule before this rule which has the [L] option gets triggered, because if it does, htaccess will never reach this rule.


1

Take a look in the directory /var/www/jekins. I'd do a find /var/www/jekins -name '.htaccess' to locate the file if there is one. If there isn't a.htaccess` fiel the authentication might be coming from the apache configuration itself. Did you not create a config file, perhaps jenkins.conf under Apache's conf.d directory? This is often times under ...


1

this did it: RewriteCond %{HTTP_HOST} ^sharpedge\.ourdomain\.com$ [NC] RewriteCond %{REQUEST_URI} !^/Internet_IE/ RewriteRule ^(.*)$ /Internet_IE/$1 [L] Thanks goes to: http://stackoverflow.com/a/11744085/530006


1

Assuming we want the IP address 12.34.56.78 to go to /var/www/client1/* and we want the IP address 87.65.43.21 to go to /var/www/client2/* RewriteEngine On RewriteCond %{REMOTE_ADDR} ^12\.34\.56\.78$ RewriteRule (.*) /client1/$1 RewriteCond %{REMOTE_ADDR} ^87\.65\.43\.21$ RewriteRule (.*) /client2/$1 Make a set of "RewriteCond" and "RewriteRule" for each ...


1

It depends on how your address was configured in the first place. You can configure a static address if you don't want it to change. If you use DHCPv6 then it depends a lot on the DHCP server. If you use plain SLAAC (stateless autoconf) then it should remain stable as long as your MAC address of your network adapter is stable, and it you use SLAAC with ...


1

Specify AccessFileName directive to use .htaccess file. AccessFileName .htaccess Enable the rewrite engine and then restart the service. sudo a2enmod rewrite



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