Directory-level configuration file found mostly on Apache web servers

learn more… | top users | synonyms (1)

1
vote
2answers
22 views

htaccess redirect subfolder to root

In the following scenario, example.com is my homepage. I need to: redirect www to non-www redirect index.html to homepage redirect example.com/store to example.com This is my htaccess code # ...
0
votes
0answers
17 views

Internal Server Error 500 .htaccess

For years, I have been using the following .htaccess for PHP to execute within HTML on Apache at GoDaddy: AddHandler fcgid-script .html FCGIWrapper /usr/local/cpanel/cgi-sys/php5 .html A few days ...
1
vote
1answer
30 views

Link re-interpreted by browser does not work

I have a problem with links generated by php, for example this link works: ...
0
votes
1answer
18 views

In CakePhP what is the recommended method for having one sub-domain that's outside the CakePhP environment?

I have a CentOS VPS with LAMP installed. I set up CakePhP and I have my httpd.conf set up with 1 virtual host which points to my CakePhP directory. I have various sub-domains in my CakePhP ...
0
votes
1answer
36 views

Block Shellshock/Bashdoor with htaccess?

How do I block Shellshock, also known as Bashdoor, in htaccess? Using a Shared Host, add a Block for User-Agent: "uname" Host: 46.105.126.165 Http Code:/?x=() Date: Jun 26 07:38:49 Http Version: ...
0
votes
2answers
23 views

What is blocking some visitors in htaccess?

How do I figure-out what is blocking some visitors in htaccess when it's NOT the IP range, User-Agent, Referer nor anti-hotlinking? Forbid empty Referer & all other domains from hotlinking to ...
1
vote
1answer
59 views

Efficient use of 301 for large redirect map

EDIT: As requested below, this is the entire ruleset for one product (obsolete now, as I should be able to consolidate these into ONE simple rule that looks for the productID#): RewriteRule ...
2
votes
1answer
31 views

Why can't I redirect www to non-www on my addon domain?

I have a domain example.com in which I'm doing this to redirect all my traffic from www version to non-www: RewriteEngine On RewriteCond %{HTTP_HOST} ^www.(.+)$ [NC] RewriteRule ^(.*)$ http://%1/$1 ...
0
votes
1answer
21 views

How do I block a UserAgent that is only Mozilla?

How do I block a UserAgent that is only Mozilla? URL: 64.79.100.26.webcrawler.link This does NOT work: RewriteCond %{HTTP_USER_AGENT} Mozilla;\)$ [NC,OR] IP Range was blocked, but I want to block ...
1
vote
1answer
45 views

Subdomain htaccess rules

I have the following .htaccess in my root: DirectoryIndex index.html index.php Options +Indexes # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ...
1
vote
1answer
70 views

Rewrite url /powers/power.php?power=

I want to rewrite my url, the url uses a variable I think its called, but I want to shorten the url to http://xatwebs.co/powers/gold as it is currently http://xatwebs.co/powers/power?power=gold I have ...
0
votes
1answer
27 views

MediaWiki configuration - strange redirect behaviour after form POST

I've recently setup a wiki using MediaWiki but am having the toughest time getting the ShortURL configuration working properly (for example, so that pages appear as Main_Page instead of ...
0
votes
0answers
18 views

URL Dynamically changes after first edit

We are developing a magento eCommerce website with main category pages, sub-category pages and details page along with other static pages. Our condition is if any miss-spelled URLs entered directly ...
0
votes
3answers
70 views

.htaccess is gone after uploading

My htaccess file is gone after uploading. I see it there for a minute or then it's gone. Even cPanel File Manager shows the same thing. Any idea how to fix it? The web host says the problem is on ...
0
votes
1answer
11 views

Testing server indexed in Google [duplicate]

Assume our website domain to be www.example.com. And we have created a separate testing environment within our main domain: Say : www.project.example.com. So we have two versions within our main ...
-1
votes
0answers
10 views

Non exisitent url is showing in webmasters tool [duplicate]

I searched all over the place for an answer to this problem but could not find one. In Google webmaster tools, I see a 404 error for the non-existent URL: http://www.example.com/www.example. ...
0
votes
1answer
67 views

Is it a good practice to block spam bots by IP ranges?

I'm getting too many hits on my website from Yandex. It doesn't obey robots.txt and by some way it can bypass .htaccess rules. So I'm thinking to block all Yandex IP ranges in my system firewall. Is ...
1
vote
2answers
101 views

SSL Enforced by Redirect but how to support NON-SNI Browsers

I'd like my website to be SSL only but I'm faced with problem regarding the SSL certification not being supported on older browsers such as IE8, not that I care to much but wondering if there's away ...
0
votes
0answers
13 views

spam referers bypass htaccess rules [duplicate]

Here is a sample code I'm using in .htaccess to block spam referers: RewriteEngine On RewriteCond %{HTTP_REFERER} ^http://.*buttons-for-your-website\.com/ [NC,OR] RewriteCond %{HTTP_REFERER} ...
2
votes
3answers
64 views

How to block a user-agent that has a spacing in its name?

I got a hit from a crawler with a user-agent called DV CRAWLER which is an abvious a spam-bot. I tried to block it in both .htacess and nginx configuration as I'm running nginx as a reverse proxy in ...
1
vote
1answer
47 views

htaccess condition if the first subfolder exists

I believe I want to know how to detect whether the first subdirectory in a request is valid. I am wanting to deploy several different versions of the same web application into different directories ...
1
vote
1answer
27 views

How to remove a slash with .htaccess

I have a problem, when I'm on the homepage and want to go to a page, it says this: continenten/.html on this server How can I remove the / so it's continenten.html and not continenten/.html? ...
1
vote
1answer
35 views

Apache htaccess - modify query string with mod_rewrite

I've recently changed scripting on my website, and this has resulted in a few 404 errors as some very old queries are no longer being redirected correctly. I've been trying to create a rewrite rule ...
0
votes
0answers
43 views

Moving subdomain to a different hosting provider

Currently my subdomain is hosted within same webhotel as my main domain. I would like to change it to point another domain (website on Windows Azure). Subdomain should be accessible all the time ...
0
votes
1answer
22 views

IP-based redirection using mod_rewrite

I'm running a small VPN server where each user has his own static IP. I set up an Apache server in order to host files for each of them and instead of using a new registration system, I wanted to take ...
0
votes
0answers
8 views

.htaccess Solution to Referral Spam not working [duplicate]

Getting hit up with a new referral spam site (site valuation dot org) this morning and I've put my usual .htaccess fix in place: RewriteEngine On RewriteCond %{HTTP_REFERER} ...
0
votes
1answer
43 views

Improving .htaccess 301 redirect for keeping SEO values on large WordPress blog

I have a client with a self hosted WordPress blog with 5000+ posts dating back several years that I'm creating a new template for. When the site is done, it will be moved to a new domain and the old ...
0
votes
0answers
22 views

.htaccess recipe for handling browsers without appropriate security protocols available or activated

We currently use .htaccess to force all traffic coming to our sites over to https. In order to pass various security requirements we should be shutting off SSL 3.0/TLS 1.0, but a small but ...
2
votes
1answer
83 views

Returning 404 error after using RewriteRule on localhost

I would like to use localhost/projects/project1/page/x instead of localhost/projects/project1/index.php?page=x. But after I had redirected the URL in .htaccess using RewriteRule, it returned my 404 ...
0
votes
0answers
45 views

How can I remove referral spam using a .htaccess file? [duplicate]

I have three websites on various topics, but I can't decrease the bounce rate for them. Some spam referrers have been increasing my site's bounce rate day-by-day. How can I remove this type of ...
2
votes
1answer
30 views

Redirect users refered from a specific site

I have a portfolio website that I have created with wordpress theme X, that is featured on two websites that showcase examples made with theme X. I am in the process of making a new portfolio ...
0
votes
0answers
31 views

How to make a WP site read only

I have a WP site that was hacked, I have an old copy that I used and the site hacked again on another server, I suspect this copy have a trojan horse in it which created new folder for phishing. What ...
1
vote
1answer
84 views

Want to redirect my site all pages to /blog

For example my site: www.example.com When anyone visits my site, I want them all to redirect to www.example.com/blog But when I open my site it should not redirect me to blog, it should work ...
0
votes
0answers
10 views

Changing website and SEO [duplicate]

My task is to put online the new website of the company (this website was done by service provider) and put offline the old one. I'm also charged to do a SEO work on the new website. The difficult ...
2
votes
2answers
2k views

vitaly rules google - How to block spam referral traffic [duplicate]

Today I saw keyword in Google Analytic, which is: vitaly rules google☆*:.。.゚゚・ヽ(^ᴗ^)丿・゚゚.。.:*☆ ¯_(ツ)/¯(•ิ•ิ)(ಠ益ಠ)(ಥ‿ಥ)(ʘ‿ʘ)ლ(ಠ_ಠლ)( ͡° ͜ʖ ͡°)ヽ(゚д゚)ノʕ•̫͡•ʔᶘ ᵒᴥᵒᶅ(=^. .^=)oo Location is showing Samara ...
0
votes
3answers
62 views

.htaccess rewrite rules not working

I need to redirect multiple subdomains to a single subdomain (www) and have found what seems to be a really good guide exactly on point: http://moz.com/learn/seo/redirection This is the rule Moz is ...
2
votes
2answers
87 views

What is .htaccess rewrite rule for humans.txt in the query string?

From http://www.allthingsdemocrat.com/block-bad-bots-in-htaccess.txt: <IfModule mod_rewrite.c> RewriteCond %{QUERY_STRING} http\:\/\/www\.google\.com\/humans\.txt\? [NC] RewriteRule .* - [F,L] ...
1
vote
1answer
196 views

Enable gzip compression On Worpress Hosted on Godaddy

I have a site hosted on Godaddy, I need to enable gzip compression on my website as it recommended on speed test, and I have added below content to .htaccess # BEGIN GZIP <ifmodule ...
3
votes
2answers
93 views

htaccess rewrite ignore 2 strings

I have the following rewrite rule to rewrite my old to new URLs: RewriteCond %{REQUEST_URI} !^/activity.*$ [NC] RewriteRule ^(.*)/([0-9]+)/$ /$1/S$2/ [R=301,L] It must also ignore /members, not ...
1
vote
1answer
70 views

“Friendly URLs” rule in .htaccess interfering with some directories

My .htaccess is set up to remove .html from URLs as follows: RewriteEngine on RewriteCond %{http_host} ^example.com [NC] RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,NC] RewriteCond ...
0
votes
1answer
26 views

http-basic auth, else placeholder-page

Is it possible to show a http-basic-auth, and when someone fails that test, show a certain HTML-placeholder-page? If so, how can I achieve that?
0
votes
1answer
28 views

Is this a valid redirect-rule return http 301?

I am relaunching a website with over 10'000 pages, must adapt URL a tiny bit and need to be sure my redirect-rules are correct. I simply need to add a "S" before the ID of that particular URL. So ...
0
votes
0answers
56 views

How to Add expiry header on thirdparty JS and CSS file in WordPress

I am using different plugins in WordPress like Disqus comment system, Theia Post slider and other.. Here is a result from GTmatrix : I want to know how can I add expiry header on third party JS ...
1
vote
1answer
54 views

Redirect subdomain to www

I created a subdomain in cPanel and set it to redirect to the www version of my site. The redirecting works insofar as redirecting subdomain.example.com to www.example.com. But when a visitor ...
0
votes
1answer
62 views

How can I get a regular expression to only match an empty string? (In a .htaccess file)

I try to make a regular expression in a .htaccess file, that matches only an empty string. I have tried many things, but it seems like it’s impossible. For example, I tried ^$, but it's looking for ...
1
vote
0answers
41 views

Inconsistent 301 redirects at GoDaddy

I am getting mixed results when using GoDaddy's built-in URL forwarding feature. While these redirects work when using the browser, a test with redirectcheck.com sometimes shows the following result: ...
1
vote
0answers
28 views

Security and Apache Methods

I occasionally get annoying POST requests but one lately caused a 500 error. Not a biggie really, but it got me thinking. My site does not have but one form. Outside of this, POST should not exist ...
1
vote
1answer
36 views

Getting 406 on IE after google redirects my site

I have a wordpress blog. When I search the posts from my site in google, the results appear and on clicking the result I can open that particular post on my site. But while doing the same on Internet ...
0
votes
2answers
78 views

Why doesn't htaccess redirect domain alias to a specific url?

I have this which i can't get to work RewriteEngine On RewriteCond %{HTTP_HOST} ^domainalias.com$ [OR] RewriteCond %{HTTP_HOST} ^www\.domainalias\.com$ RewriteRule ^(.*)$ ...
0
votes
1answer
78 views

.htaccess rewrite but keep basic URL

I have basic domain, for example, domain1.com. Also I have domain2.com which is addon domain, and I want to redirect domain2.com to domain.com?parameter=value, which is basically domain1.com, but with ...