Directory-level configuration file found mostly on Apache web servers

learn more… | top users | synonyms (1)

1
vote
2answers
105 views

Banning IPs through my htaccess doesn't work. Why?

The story is incredibly long. Long story short, someone is using amazonaws IPs for a bot that's clicking on my Adsense ads. I'm trying to ban all amazonaws IPs, but it doesn't work. The bigger problem ...
0
votes
2answers
57 views

Point new domain to existing websites sub-directory?

I have a website (site1.com) that has another site being built within it (site1.com/newsite). My client wants to create a new domain name and have it point to the directory that houses the new site. ...
0
votes
0answers
33 views

Is it possible to forward a domain with one subdomain exception?

I have a www.example.co as my primary domain and a domain example.technology is forwarded to that domain. Now, can I add an exception for subdomain.example.technology to this confuguration? If the ...
1
vote
1answer
825 views

How do I expire by type in .htaccess for remote loaded Google fonts?

Is it possible to set expire by type for remote fonts or Google analytics? I'm getting this report from GTMetrix and everything I've tried isn't working. Suggestions? There are 4 static components ...
0
votes
1answer
66 views

Redirecting a Preview DNS subdomain to a domain with htaccess

I want to redirect all the WordPress urls of the form http://example.com.previewdns.com/my-favorite-post/ to http://example.com/my-favorite-post/ I am trying to do this with the below .htaccess ...
0
votes
1answer
672 views

How to leverage browser cache using .htaccess on nginx?

I'm trying to increase the pagespeed of our website ubercore.co. I'm using PageSpeed Insights for Chrome extension to analyze the pagespeed. It has suggested me to "Leverage browser cache". This is ...
0
votes
1answer
174 views

.htaccess - delete characters from URL and redirect

I need help modify a file .htaccess delete characters from URL and redirect. The file .htaccess is currently empty. I want to change the word article to the word topic in all the URLs. The current ...
2
votes
1answer
193 views

Changing file extensions in URIs - Server Error after Apache upgrade

Please can anyone help to identify flaw or incompatibility in .htaccess code causing server error? In the process of changing over from static to dynamic website, I had to maintain some static files ...
5
votes
2answers
530 views

I am changing my file extensions in URLs, how to keep my good SEO results?

We have a website with good SEO results. For design reasons I have to update the design and I have to change file names from .html to .php. But I keep my domain name! What should I do in order to ...
2
votes
2answers
267 views

Using .htaccess, can you hide the true URL?

So I have a web hotel with 1 main website http://www.myrootsite.com/ and a few websites in subdirectories, in a folder called projects. I have domain names pointing to the subdirectories, but ...
3
votes
1answer
498 views

What do I put in htaccess to create a 410 error page when a URL parameter is present?

I tried to create a 410 error page but realized that I actually created a 302 redirect to a 410.php page. Instead I want to use a 410 error to block out an infinite number of dynamically created pages ...
4
votes
1answer
79 views

Is there any difference, from Google's point of view, on the method used for a 301 redirect?

I have a website with an extremely good Google rank for it's particular niche. I've rebranded and need to redirect to a new URL. In the eyes of Google, what's the difference, if any, between the ...
0
votes
1answer
22 views

How can I rewrite to my .htaccess in PHP? [duplicate]

How to rewrite my URL from http://www.mysite.com/listingsecond.php?ID=1 to http://www.mysite.com/listingsecond? How can I rewrite to my .htaccess in PHP to do this?
2
votes
1answer
247 views

Can I set Cache-Control in the .htaccess file for a specific part of a document (just a section of the <body>)

I noticed, by using Google Page Speed Insights, that if I structure my HTML to load the critical, above-the-fold content first, my page will improve performance - and it woks (with now current perf. ...
1
vote
2answers
101 views

IP, and page-specific redirect?

I'm trying to send a particular IP, that is trying to get one page on my site, to another page, and do this through my .htaccess file. I've seen many general descriptions of how to do it (in many ...
0
votes
1answer
39 views

SEO changing main domain in Google Search results?

At the moment there is 3 domains pointing to same server for content, and of course their have the canonical URL set to tell Google about the duplicate content, but the questions is, if we take into ...
1
vote
4answers
78 views

How to perform a 301 redirect with .htaccess and PHP

The website I am referencing in my question is http://www.bgmenus.com. I have successfully created clean urls like this for my listings: http://bgmenus.com/five-guys/341 I rewrote those using this: ...
1
vote
1answer
28 views

Page caching Is not working

This is my htaccess file.I also embedded webcaching code inside it. DirectoryIndex index.php <IfModule mod_rewrite.c> RewriteEngine On #RewriteBase / RewriteCond %{HTTP_HOST} ...
0
votes
0answers
271 views

SocialEngine 4.5 redirect loop problem

I am installing SocialEngine 4.5. Here is the .htaccess file in the first level of the SocialEngine /public_html/social_engine2/ directory: # $Id: .htaccess 7539 2010-10-04 04:41:38Z john $ ...
1
vote
1answer
105 views

How can I set my robots.txt file to let bots not crawl certain folders in root directory?

I have a small website with about 20 pages with .html extensions, containing unique articles I wrote consisting of about 1000 words or more. These 20 pages are the main feature of my site. Root ...
2
votes
2answers
208 views

Error 404 after rewrite query strings with htaccess

I'm trying to redirect the URLs of a client's website like this: www.localsite.com/immobile.php?id_immobile=24 In something like this: www.localsite.com/immobile/24.php I'm using this rule in ...
0
votes
0answers
46 views

Apache: keep track of non-404 errors (e.g., 403, 500, et al)

In cpanel I always have the error log open ("This function will display the last 300 errors for your site.") which is nice for 404's but what about the rest? I'm working on a few things in htaccess, ...
2
votes
1answer
100 views

Simplest way to lock down a beta web site but allow paypal payments

Perhaps a strange question, but I have a website that's not ready for production use online in order to test paypal payments. I had locked down the site using a .htaccess file however this also ...
0
votes
1answer
51 views

“Coming Soon” HTML page not displaying

Disclosure: I have very little knowledge of webmastering. I have a simple HTML page as a placeholder on my website (index.html). I've uploaded it to the website root and created the .htaccess file to ...
0
votes
1answer
13 views

find-new/posts&recent=1 as homepage: what about SEO? [duplicate]

I can't change the URL of my website with .htaccess, because the query does not work anymore if I make it a pretty URL, so I am desparate to know what impact this will have on SEO. I mean, I have to ...
1
vote
1answer
426 views

How can I get my website to enable gzip compression?

I'm currently trying to increase the speed of my website and I noticed that, when I run it through ismyblogworking.com, I get a message that reads "your blog application doesn't support gzip ...
1
vote
0answers
100 views

Apache HeaderName does not work in .htaccess

So I have a .htaccess file in a subdirectory that contains a list of folders. In the main directory I have a .htaccess file that contains: Options +Indexes IndexOptions FancyIndexing AddType ...
1
vote
3answers
171 views

SEO friendly URL

I want to create SEO friendly URL for my website. I am creating a .htaccess file but these file not run in Bluehost. Bluehost gets an "Internal Server Error": The server encountered an internal ...
1
vote
1answer
96 views

What is occurring in this .htaccess file in regards to rewriting to clean URLs?

I have the following code in my .htaccess file, which is working fine and using "pretty" permalinks to reroute everything back to /index.php, and using $_GET values to serve customized content based ...
0
votes
0answers
221 views

Remove fb_action_ids of the URL with .htaccess

For some reason my host not let me have more than one htaccess so I have to make all the changes from the htaccess located in the root. My directory tree is as follows: ..../ ....index.html ....css ...
0
votes
2answers
71 views

Apache .htaccess URL rewriting is not working

I am using this code in .htaccess but the last line not giving any response: RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-l RewriteRule ...
1
vote
1answer
42 views

Changing www to point to non-www, instead of the opposite, using .htaccess

I'm switching servers and need to change the following RewriteCond and RewriteRule commands in the .htaccess file. Right now I'm pointing domain.com to www.domain.com using: RewriteCond %{HTTP_HOST} ...
1
vote
1answer
154 views

Using RewriteBase in .htaccess to make links pretty

I'm working on a project right now and I'm trying to make the links pretty. We have urls like this: http://subdomain.domain.com/DynamicCountry/DynamicName/file.php What I'm trying to do is set the ...
2
votes
1answer
752 views

Redirect with HTTP_HOST redirects to sub subdomain

The settings I have the following .htaccess rule RewriteCond %{HTTP_HOST} !^www\. RewriteCond %{HTTP_HOST} !^de\. RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L] This works great to ...
1
vote
0answers
274 views

.htaccess language detection, redirect and friendly URLs [closed]

I'm having problems with my .htaccess file. RewriteEngine On RewriteCond %{HTTP:Accept-Language} (fr) [NC] RewriteRule .* http://www.example.com/frans [R,L] RewriteRule .* ...
2
votes
2answers
62 views

Need help writing .htaccess / Apache rule

I have some URLs which are now 404 due to site upgrade. I want all URLs starting with www.example.com/archives/* to point to www.example.com/news (notice that after archives there is a wildcard ...
0
votes
3answers
90 views

Using a front controller design pattern doesn't allow images to be served

I am currently using a front controller. All requests for my website go through it. I have a problem with image links like: <img src="img/image.jpg" /> Then my front controller will try to ...
0
votes
0answers
30 views

Visitor statistics distorted due to domain forwarding

I am forwarding traffic from one domain to another which is hosting a site with Google Analytics. The forwarding is done via the registrar's URL forwarding tools, which allows us to avoid creating an ...
2
votes
1answer
77 views

Rebranding: how do I redirect my website to a new domain, and blog to a subdomain?

I have a website that I am rebranding and using a new domain name for. Right now it is primarily a blog hosted at the root. I am going to be redirecting from www.old.com to www.new.com, and I also ...
1
vote
2answers
144 views

DNS created and pointed to new IP, but showing a blank page - do I have to redirect it using .htaccess?

How would I go about configuring my web server to handle a domain that's already configured using DNS to then redirect it to a folder? My friend pointed his domain forum.example.com to my forums at: ...
1
vote
1answer
274 views

301 redirect causing Bingbot to crash, redirection limit reached

Inside my .htaccess file, I have the following script: RewriteEngine on RewriteCond %{HTTPS} off RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] <IfModule mod_rewrite.c> ...
0
votes
2answers
1k views

How long does Google Webmaster Tools take to index a website?

How much time does Google Webmaster Tools take to index a page? Analytics took around 24 hours to get info from the site, but since this is indexing, I guess it might take a little bit more than that. ...
0
votes
0answers
43 views

cPanel redirects not working on extensionless files

I'm trying to redirect the address http://example.com/newsletters/January%20Newsletter%20 to http://example.com/newsletters/JanuaryNewsletter.pdf using cPanel's redirect manager, but it doesn't seem ...
2
votes
1answer
82 views

Redirect URL with query string to homepage

I can't figure out how to make users visiting my website using links like: mysite.com/?ref=XXXXXXX see the homepage instead of a completely blank page. I tried using htaccess but I can't figure out ...
1
vote
2answers
936 views

Remove .php and id from URL and replace with slash

I have tried lots of URL rewrite rules in .htaccess but I am stuck now. I have to change this URL: products.php?id=31 to products/31 I have used: Options +FollowSymLinks -MultiViews ...
4
votes
2answers
108 views

Prevent Google from listing hotlinked images for other sites

I am hosting several domains on my server and hotlink images accross various domains. However, I have found out that in Google searches, the images are listed as originating on the site where the ...
0
votes
1answer
138 views

Remove query string from 301 redirect URL

I'm having some trouble with redirects and I haven't been able to get this to work. I want to make http://www.mysite.com/seasonal/christmas?p=15 redirect to ...
2
votes
1answer
75 views

Prevent Google Indexing SubDomains

I have cPanel Hosting with only 1 IP. I'm in the process of pointing all my TLDS over to this server. I have created 'Addon Domains' and all the folders from which it creates are located in sub ...
2
votes
1answer
70 views

Inserting WordPress in a site with .htaccess Rewrite Rule

I want to insert a WordPress blog in a website which is programmed in PHP and that uses includes() to select what content to show, and that uses .htaccess Rewrite Rule to get friendly URLs. The ...
1
vote
0answers
198 views

Bot crawling my site, blocked it, now it's back and can't stop it [closed]

I had a bot of some sort crawling my site like crazy for the last day or so. It says in Google Analytics that it's from San Jose in the US. The IP addresses that appeared in the access logs were ...