Directory-level configuration file found mostly on Apache web servers

learn more… | top users | synonyms (1)

0
votes
2answers
658 views

When using Mod_rewrite does google bot see the original url or the rewritten url?

If i use the bellow code in my .htacess file would google bot (or any other search spiders) see the example.tumblr.com url or would they see the same url as the user ie. example.co.uk/blog ? ...
1
vote
1answer
275 views

Need to sanity-check my .htaccess, especially Limit GET POST line for Google repellent

I need a sanity check on this .htaccess (from a WordPress site) I inherited from a 5 month+ old site. What's the symptom? Google + Bing crawl, but don't index any of the pages. Let me be clear: I'm ...
2
votes
1answer
338 views

.htaccess rewrite , parked domain on another site to read the proper domain name

I have a parked domain example.co.uk on another domain name web-space in a folder and need to rewrite the domain name in the browser URL as it currently shows the other domain name while browsing and ...
1
vote
1answer
515 views

Block access to robots.txt file .htaccess

I read in this forum that this .htaccess code should block access to the robot.txt file: RewriteCond %{HTTP_USER_AGENT} ^Mozilla RewriteCond %{HTTP_USER_AGENT} !(Slurp|surfsafely) RewriteRule ...
4
votes
4answers
1k views

htaccess 301 redirect help needed(removing GET parameters)

Due to some issues in my site many pages are visible as duplicate using : www.example.com/page.html?task=view but it's content is exactly same as www.example.com/page.html. One way is to use http 301 ...
3
votes
1answer
513 views

Proper caching method with .htaccess [duplicate]

Possible Duplicate: .htaccess and browser caching There are a lot of snippets that enable caching on a website and I don't know which one should I use. The most popular is something like ...
4
votes
3answers
1k views

Redirecting subdomain to root index.php

I am new to this. Here is the situation and I'm wondering if someone can suggest the best solution to it: I have a domain www.mydomain.com where I have a Magento website running, we are in ...
1
vote
1answer
135 views

Is redirecting mydomain.eu & mydomain.net to mydomain.com using .htaccess spammy?

A client has asked me to develop their site - they already own 3 domains, mydomain.eu, .net and .com. They want all the traffic from .eu and .net to redirect to .com. I've explained to them that it ...
0
votes
4answers
175 views

Redirect everything from old domain to new domain

I need to (permanent) redirect all of the following: www.domain.com www.domain.com/folder sub.domain.com sub.domain.com/folder Basically all URLS that are reachable without being intended to: ...
2
votes
1answer
503 views

Tell apache to point to a subfolder as default starting point for public

What would be the different methods of telling Apache to serve up httpdocs/public instead of httpdocs as the default starting point? I want to be able to have my includes and logs directories behind ...
1
vote
1answer
838 views

possible to use an IP derived from Dynamic DNS in htaccess IP allow/deny commands?

On a website I manage, I want to use an .htaccess file to allow access to a certain administrative directory only from my home IP address, which is dynamically assigned by my ISP and therefore changes ...
4
votes
1answer
191 views

Best way to protect public facing development environments?

We're in the process of setting up individualized dev environments for our developers. All of our developers are remote and we don't have a VPN or anything to bring this in house. But here's the ...
3
votes
9answers
13k views

Need to Stop Bots from Killing my Webserver

I am having EXTREME bot problems on the some of my websites within my hosting account. The bots utilize over 98% of my CPU resources and 99% of my bandwidth for my entire hosting account. These bots ...
3
votes
3answers
22k views

How to set suhosin.post.max_vars in a htaccess file

I need to add this values to my htaccess: suhosin.request.max_vars = 8000 suhosin.post.max_vars = 8000 If I just add them like that I get an Internal Server Error Which is the right way to ...
3
votes
1answer
154 views

.htaccess Redirect Old Threads

I have moved to mybb to vanilla and want to redirect old threads to the new format, so the indexed threads on google aren't lost. The old format is showthread.php?tid=3003 Whereas the new ...
1
vote
1answer
1k views

Redirecting a subdomain to an HTTPS website

I need to redirect a subdomain on my website to a third party HTTPS website. We have our website hosted on GoDaddy and I tried their subdomain forwarding mechanism but that didn't work. That's when I ...
2
votes
1answer
284 views

mod_rewrite for directories

One of our developers who built the framework that our website uses is no longer with us and I appear to have a stack of issues across the site currently, one being URL rewriting across the site. ...
1
vote
1answer
3k views

.htaccess: allow from - using dynamic IP - defining the static portion of my IP?

I'm looking to secure my phpMyAdmin dir from being accessed from other IPs than my own, albeit dynamic IP, let's say it is 191.164.1.xxx (xxx = being dynamic numbers). Referring to the Apache ...
0
votes
1answer
492 views

How do I 301 redirect from the root folder to a sub folder while keeping the rest of the URL string intact

When I first launched my site, it I had MediaWiki in the root and a wordpress blog in a subfolder, /blog/. After a while spammers took over the MediaWiki site and I had to remove it. The problem is I ...
2
votes
2answers
431 views

301 Redirect exception vs. Script new connection to DB

I'll get right to it because this will be long. I've built a WordPress site for a client on a new domain name and 301 redirected his 3 other domains to point to it. Then, I learn that he has a ...
2
votes
1answer
396 views

zlib compression issues

I'm having some issues running zlib compression on my site .. Firstly if I enable zlib compression in .htaccess using: php_value output_handler ob_gzhandler then I receive thousands of lines of the ...
3
votes
1answer
689 views

Redirecting a .co domain to a .co.uk with masking

This is my first post here, so be gentle... A friend wanted a website and paid for one to be set up. For reasons unknown to me he ended up with hissite.co rather than hissite.co.uk, which is what ...
1
vote
1answer
677 views

Google sitemap access error, something to do with .htaccess redirect from http://www. to http://

I recently updated the htaccess of my site to redirect from http://www. to http://. It all works fine but now I've made some changes to my site and uploaded a new sitemap.xml to google webmaster. I'm ...
1
vote
2answers
4k views

.htaccess 301 Redirect Hash Tag Redirect

How do I do a .htaccess redirect that has a hash tag in it? Example Source: domain.com/#/subdir Target: newdomain.com/whatever/something Everything I've tried ignores the hash tag and either ...
1
vote
1answer
2k views

Restrict direct folder access via .htaccess except via specific links

I want to restrict access to a folder on my server so that visitors may only access the contents (a web application) via links in the same domain. Can I do this using .htaccess? To be clear, I simply ...
1
vote
2answers
3k views

.htaccess and browser caching

I ran across these suggested htaccess edits. Is this a good practice? Is this something I should implement on my wordpress site?: <IfModule mod_expires.c> ExpiresActive On ExpiresByType ...
2
votes
1answer
655 views

Htaccess - Rewrite png to php file

I currently use trans.png.php?id=1&campaign=test to track my newsletter campaigns. I want to use trans.png instead as it's the src of an img tag. How can i do this in htaccess? Also is there any ...
4
votes
2answers
3k views

How to write a generic .htaccess file rule, regarding RewriteBase

The following rule in my .htaccess works just fine for routing calls to index.php: RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php [QSA,L] However, this does not ...
1
vote
2answers
203 views

Strange links appearing in 404 logs

I've recently been going through our 404 logs and we have a number of urls which look like this turning up:- ...
1
vote
1answer
123 views

Links don't work on new server

I've recently moved from server with php4 to php5. Now I cant open content in my page. Links look like this "page.com/news-it-is-rainy-day-1.html". But when I try to open link I just get the archive ...
1
vote
1answer
200 views

Website .htaccess file for Wordpress sub folder

I developed a Flash website for a client and added the following .htaccess file in the root directory and the non-www to www redirect works perfectly. RewriteEngine On RewriteCond %{HTTP_HOST} ...
11
votes
2answers
3k views

Can .htaccess slow down a site?

I'm working with a client on an e-commerce website. I implemented clean URLs using .htaccess. I also used .htaccess to solve canonical issues such as redirecting www to non-www and removing index.php ...
2
votes
1answer
601 views

htaccess preventing sqlite database being downloaded

I have a VPS, running apache2 on Debian 6. Created a file called .htaccess on the web root, which included: <Files ~ "\.db$"> Order allow,deny Deny from all </Files> ...
0
votes
2answers
404 views

htaccess and htpasswd trouble

This is the first time that I have ever tried working with .htpasswd and .htaccess files, so please point out my childish works. I have my apache document root set to /www/ on my debian server. ...
2
votes
1answer
2k views

.htaccess - lose the file .html extension

I'm having a bad .htaccess day! I want a user to be able to type the URL mysite.com/about instead of mysite.com/about.html On .htaccess file I have: RewriteEngine On RewriteCond ...
3
votes
1answer
721 views

RewriteRule working local but not on remote server

I have a .htaccess file with one simple RewriteRule: RewriteEngine on RewriteRule ^([A-Za-z0-9-]+)$ ?site=$1 I want to have an url like http://www.example.com/imprint and forward it to ...
1
vote
2answers
119 views

Full password not required to access password protected directory?

I password protected a directory in cPanel. When I went to access the page in my browser, I accidentally hit backspace on the password before I hit enter. Surprisingly, the page still loaded. I played ...
1
vote
2answers
1k views

Having mod_rewrite not rewrite requests for a particular directory

I have many forward rules written in my .htaccess file. However, for the requests to a certain directory and its subdirectory, say wordpress, I don't want to use the forward rules. RewriteEngine On ...
4
votes
2answers
791 views

Difference between “/” at end of URL and without “/” [duplicate]

Possible Duplicate: Does it make a difference if your url ends in a trailing slash or not? Why treat these as different URLs? I am doing a 301 redirect in my WP application using ...
3
votes
1answer
819 views

Rewrite img and link paths with htaccess and serve the file from rewritten path?

I have a static mockup page, which I want to "customize" by switching a variable used in image-src and link-href attributes. Paths will look like this: <img src="/some/where/VARIABLE/img/1.jpg" ...
3
votes
1answer
1k views

Will adding “www.” to my domain setting in Google Analytics impact already collected data?

I have a profile in Google Analytics (GA) that has been collecting data for a year. The domain setting in GA is "http://example.com". The site, however, will redirect any non-www request, to ...
2
votes
1answer
683 views

GoDaddy-Drupal Site down due to mysql password change, how to change it back?

PDOException: SQLSTATE[28000] [1045] Access denied for user 'lev1127301002684'@'188.121.41.131' (using password: YES) in lock_may_be_available() (line 167 of ...
2
votes
3answers
3k views

How to restrict site access to all countries except mine with .htaccess?

I used this tool to download list in ".htaccess allow" format to allow traffic from my country and restrict all others but it's still accessible when visiting from bunch of foreign proxies. I'm ...
4
votes
1answer
196 views

Do Dynamic Subdomains Harm SEO or not?

I am establishing a new website for just resumes, and I structured my htaccess as to provide dynamic subdomains as: marketing.resumedomain.org/index.html sales.resumedomain.org/index.html ...
1
vote
1answer
144 views

Which redirection needed for this in .htaccess? 301 and?

I have two cases, it is very hard for me to separate them. I see them as redirection -problem. # 1. I want to redirect all .*/feeds to mySite.com/feeds showing # the content of ...
0
votes
1answer
94 views

Website performance tips?

I'm kind of having some troubles with the loading of my website. It sometimes loads fast, then when you refresh it, most of the time, it will just keep trying to load images. It will keep doing that ...
0
votes
3answers
4k views

Restrict access to IP address range

I’m trying to restrict access to a web resource to the intranet of a company via .htaccess. Unfortunately, the approach via Allow from … isn’t working for me and and I don’t understand subnets well ...
0
votes
3answers
309 views

“Index of …” directory's files listing

On my courses we've got homework on site in folders such as: http://example.com/files/tasks1-edc34rtgfds http://example.com/files/tasks2-0bg454fgerg http://example.com/files/tasks3-h1dlkjiojo8 ... ...
3
votes
2answers
366 views

Create friendly looking URL's with mod rewrite

I want to make the pages on my site more search engine friendly by turning the query strings into meaningful looking page names. For example I have a page that is this: /search.php?c=18 I want it ...
1
vote
1answer
693 views

.htaccess issue (500 - Internal Server Error) error

I was trying to learn how to edit and make a .htaccess file using a tutorial found at corz.org, I copied an existing .htaccess file from another site on my localhost and pasted the following content ...