Directory-level configuration file found mostly on Apache web servers

learn more… | top users | synonyms (1)

2
votes
1answer
20 views

.htaccess not passing GET parameters

I have a .htaccess file that looks like this: RewriteEngine on RewriteRule ^login$ /login.php? [L,R=301] However when I do any get parameters such as /login?random=get&params=true they don't ...
0
votes
0answers
23 views

My Website is getting a lot of traffic from an unresolved IP address [on hold]

My website is getting lot of traffic from an unresolved IP. I am using AWStats and it is showing that I am getting huge amount of hits within few seconds. My hosting company suspended my website ...
1
vote
1answer
29 views

Restrict access to certain files but not when linked from my own website

I got a problem regarding setting my server settings so that my files can't be accessed from people linking directly to the files, but can when they click a link on my website to open the file. I ...
4
votes
2answers
56 views

Create redirect from url like www.example.us/?p=100&option=

I am switching CMS and have about 600 URLs that need to get redirected to the new scheme. The URL on the old site looks like the following on my test server: ...
0
votes
0answers
24 views

Friendly URLs with .htaccess

I'm have the following .htaccess: RewriteEngine on RewriteCond %{request_filename} -f RewriteRule ^(.*) $1 [L] RewriteRule ^(([^/]*)+)(/([^/]{0,32})(/.+)?)?$ index.php?a=$1&q=$3 [L] My ...
0
votes
1answer
31 views

How to use htaccess to redirect from www to non-www version of the site [duplicate]

I have a wordpress website mywebsite.net on the wwww version www.mywebsite.net wordpress doesn't load so want that if the user open the www version of my website is redirect to the non-wwww ...
0
votes
0answers
33 views

Sub-Domain Redirect Loop .htacess

OK so i am getting a redirect loop on subdomains only and i dont see the whats creating the loop This is a WordPress Multi-Site sub-domain installation and All plugins are disabled everything on the ...
1
vote
1answer
42 views

How to keep friendly URLs consistent?

I downloaded a site with a crawler script (HTTrack) and now have a few hundred HTML files that need to be edited and re-deployed. The original site ran on a combination of Drupal and a lesser known, ...
0
votes
0answers
11 views

How do I hide the install folder [webroot] while using a subdomain?

Wanted to try out a web install of Owncloud. For some reason or another Owncloud has a hard time masking its own install folder (the webroot) when using a subdomain defined via an A record and picked ...
1
vote
1answer
27 views

Moving site - make all links 301 on same tld

Customer had website in Joomla like this: www.example.com/home/ www.domainA.com/home/aboutus www.domainA.com/home/blog Not sure why it was made this way with /home as default. Anyway I moved the ...
3
votes
2answers
63 views

503 status fails to load images or CSS

I have the following 503 status set: RedirectMatch 503 ^/(?!index\.html) ErrorDocument 503 /index.html Header always set Retry-After "604800" I understand that this rule tells any robots that the ...
1
vote
2answers
31 views

Apache .htaccess - All URLs with different parameters to ONE redirect

I need some help with .htaccess redirect. http://www.example.de/test-music.html?p1=1&p2[test]=23 http://www.example.de/test-music.html?p1=6&p2[test3]=5 ALL of them need to be redirected to ...
3
votes
2answers
39 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 # ...
1
vote
1answer
38 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
24 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
40 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
24 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
68 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
41 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
26 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
49 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
75 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
31 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
19 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
5answers
109 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
13 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 ...
0
votes
1answer
75 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
117 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
14 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
70 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
59 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
47 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
49 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
27 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
46 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
24 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
105 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
46 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
33 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
32 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
85 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
63 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
94 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
257 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
98 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 ...