Tagged Questions

Directory-level configuration file found mostly on Apache web servers

learn more… | top users | synonyms (1)

2
votes
2answers
48 views

HTTP code 403, access denied & Options -Indexes

at "webmasters.stackexchange.com" I already found a similar topic: Stop directory listing using .htaccess and redirect to good error page Options -Indexes ErrorDocument 403 /path/to/403.html ...
1
vote
0answers
169 views

Password protect directory with .htaccess and .htpasswd on direct-admin

In my last cpanel hosting I protect directories by this .htaccess code: Options +FollowSymLinks RewriteEngine on RewriteCond %{HTTP_HOST} ^www.example.com$ [NC] RewriteRule ^(.*)$ ...
1
vote
2answers
77 views

Site migration questions— PHP, link structure & SEO

I'm working on a massive site overhaul and the main structural change will be a move from static HTML to PHP. I work for an art gallery, and having the artist names in URLs is critical. We already ...
1
vote
0answers
20 views

line monitoring of phonograms (songs) of radio [closed]

I need to create a monitoring system of phonograms (songs) of radio and television online through streaming so on, but my team and know the way to develop this monitoring system, I know there ...
2
votes
2answers
262 views

Why does .htaccess not prevent a php script from accessing a file

I ran into the following issue: On a website I want to prevent "unauthorized" access to a set of .xml files - the user has to authenticate first. Now it would be possible for an authenticated user to ...
1
vote
2answers
35 views

local install of wp site brought down from host - home page is ok but other pages redirect to wamp config page

local install of wp site brought down from host - home page is ok but other pages redirect to wamp config page. I got all local files from host to www dir under local wamp. I got database from host ...
1
vote
1answer
81 views

Does masking a subfolder with .htaccess have a negative effect on SEO?

My website is physically located at example.com/websitedirectory. I am masking the folder so that the document root folder is redirected to /websitedirectory and the folder is masked, so that it ...
1
vote
3answers
202 views

Remove all content not related to index.html from the web and google

I have seen many suggestions on various redirects, but none were simple and many had no accepted answer. I have a site I wish to completely remove from google and have only my homepage available In ...
2
votes
1answer
100 views

How to noindex a 404 page using .htaccess?

I have several 404 not found pages which I would like to noindex through .htaccess. how do I do it with X-Robots-Tag?
1
vote
2answers
577 views

Htaccess redirect based on country of origin

Can a rule that filters and redirect traffic based on country of origin be implemented in .htaccess? Can it be implemented in any other way then by an IP address? I need the solution to be as ...
0
votes
2answers
155 views

Google still has record of my old site URL - what to do?

I had a blog site, i.e. http://example2.com, then I bought a new domain, i.e. http://example.com and 301 permanent redirected example2.com to example.com. But when I get into the Google Webmaster ...
0
votes
1answer
24 views

Redirect blog archive into certain format

I asked the question in WPSE before, but the answer I got so far is a complicated one. I'm actually looking for a .htaccess way. Here's what the scenario is: My blog archive URLs were like: ...
1
vote
1answer
36 views

Cannot edit .htaccess

So I had some issues regarding my website security and my host provider added this to my .htaccess until I solve the issues: deny from all allow from 10x.xxx.xxx.xxx Now, I solved my issues, but ...
1
vote
1answer
95 views

My Server is returning a 404 instead of 403 when access if forbidden - is it good or bad?

via .htaccess, I forbid access to folders that have no index page inside (domain.com/images for example), and also block my site completely for several user-agents (such as wget). When I test to see ...
5
votes
5answers
1k views

Should I block agent Wget/1.12 (linux-gnu)?

Is that a scraper? It tried accessing my site which is currently password protected for testing purposes. shall I block it?
1
vote
1answer
79 views

Non HTTPS site is indexed as HTTPS in Google Search

I have hosted a site over shared hosting (ipage) and not have setup SSL certificate (which I don't need), but some how Google have indexed it as HTTPS link which popup security error on opening it. ...
3
votes
1answer
117 views

htacess seems to make the page load forever

I need to rewrite a URL of my server so the URL looks friendly. Like: site.com/var1/var2/var3/... to site.com/index.php?page=var1/var2/var3/... So I wrote this .htacess: RewriteEngine On ...
3
votes
1answer
61 views

Make a domain point to another domain

I have never been able to figure out how to do this. I am working on a PHP script. With my script, each user will have access to their own site. For example, the URL for this would be ...
2
votes
2answers
124 views

Unwanted redirect from a domain to my site

An external person from my client company registered a domain and redirected to my client URL. For instance, if you type unwanteddomain.com it redirects to myclientdomain.com. Is there any way to ...
1
vote
1answer
362 views

Masking / mapping URL's with .htaccess

I've recently been trying to come up with a way of masking the visible URL in the browser (so not 301 redirecting) and still show the same content as the original URL. Here is the scenario... ...
0
votes
0answers
86 views

HTTPS redirect to HTTP not working with 'www' subdomain

I have 2 rules on my site: one to force the www subdomain, and another to force the HTTP protocol: RewriteEngine On RewriteBase / RewriteCond %{HTTPS} =on RewriteRule ^ ...
1
vote
1answer
273 views

Is there a “current directory” variable in .htaccess RewriteRule?

In a .htaccess file in the subfolder "/preview" (not in document root), I have this rule: RewriteRule !^public/ /preview/forbidden.php [L,R] It redirects all /preview/"something" requests that are ...
1
vote
2answers
51 views

Geolocalization of my website

I have a big problem with GeoIP. My website has the following structure www.domain.com it.domain.com de.domain.com I use the MaxMind GeoIP module in Apache to redirect users to the appropriate ...
0
votes
1answer
35 views

301 redirect specific URLs

I have a lot of 404 pages looks like that: lalala/lalala/Users_PasswordReminder.aspx?something=lala lilili/lilili/Users_PasswordReminder.aspx /Users_PasswordReminder.aspx?username=admin etc. I ...
2
votes
5answers
222 views

Apache URL rewriting not working

All .php files are rewritted before doing the below rewriting: test.php => test foo.php => foo I want to rewrite this URL http://www.testdomain.com/test?name=john&id=2&nick=doe to ...
2
votes
1answer
100 views

.htaccess port 80 to another port SEO impact?

I am using the Ghost blogging platform. By default to access the blog you go to blog.my-site.com:2368 of course this makes for a ugly, unfriendly URL. I am using .htaccess to change the behavior so ...
0
votes
1answer
461 views

URL rewrite to another folder and file for specific requests

I have following directory structure on my local LAMP: www basic app router.php public index.html .htaccess and I can access my index page with localhost/basic/public/ and I am not using ...
0
votes
1answer
56 views

Shorten URL with Regex

Here's an example URL to a user profile on my site: http://127.0.0.1:8080/overview/showuserprofile/user I want it to be: http://127.0.0.1:8080/user This is what I have for rewrite rules: ...
2
votes
2answers
424 views

How to block user agent from accessing my WordPress site with htaccess?

I have noticed large amount of traffic coming to my site from different IP's with user agent. Mozilla/5.0 (compatible; SiteExplorer/1.0b; +http://siteexplorer.info/) I don't have much experience ...
1
vote
2answers
120 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
73 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
34 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
1k 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
114 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
1k 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
214 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
285 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
545 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
336 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
817 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
23 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
325 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
115 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
42 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
85 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
30 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
331 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
114 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
273 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 ...