Directory-level configuration file found mostly on Apache web servers

learn more… | top users | synonyms (1)

2
votes
1answer
480 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 ...
1
vote
1answer
56 views

PHP webpages in sub-directory cannot be accessed

I've got a university club website at thing.uni.ac.uk/meow/foobar which also has the domain foobar.co.uk. I don't have access to the config. I set up this website using HTML/CSS/JS alone and it's been ...
1
vote
1answer
33 views

Why does Apache parse .htaccess if accessed through the main page and not through a VirtualHost?

I have two websites. One is hosted on /var/www (www.example.com) and the other is /var/www/test (test.example.com). The second is a VirtualHost. I wrote a .htaccess (I'm using it to mod_rewrite), put ...
1
vote
1answer
695 views

Excluding Facebook Crawler From Following Htaccess Redirects?

I recently made my website https and it's previous url (http) had many Facebook likes which I would like to migrate to the new https url. The only change to the url was the https, no domain change or ...
1
vote
1answer
99 views

How can you use Apache .htaccess to specify the location of the PHP binary on shared hosting?

I'm using shared hosting, can create .htaccess and php.ini and have access to ssh. I have PHP 5.6 installed to ~/public_html/php56 and can use this path with ssh, cron and exec() but not on the web. ...
1
vote
1answer
757 views

URL rewrite issue with cakephp

I am using cakephp framework 2.2.2 I want to create personalize URL for user if user enter username=pragnesh then they can access my site like http://pragnesh.mylocalhost.com same as in blinksale....
0
votes
1answer
59 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
219 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 environment,...
0
votes
1answer
43 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 ...
3
votes
0answers
43 views

What is the cause of page speed performing extremely poorly on Chrome on Windows and Safari on Linux?

I am more interested in the cause of poor page loading speed on Chrome/Windows, since this combo covers the vast majority of our users. The average page speed in the last month is 55 seconds for ...
2
votes
0answers
41 views

.htaccess IP whitelist is being ignored

I have the following in my .htaccess file to only allow access from a block of IP's and everyone else is being redirected: <IfModule mod_rewrite.c> RewriteEngine On Options +FollowSymlinks ...
2
votes
0answers
87 views

RequireAll blocks overriding each other

I have recently converted a pre-2.4 configuration to Apache's new authorisation configuration but ran into a problem/misunderstanding concerning more than one RequireAll block. What I am basically ...
2
votes
0answers
40 views

Separate multiple domains with htaccess (solution works on one hosting, not on another)

I have two different domains on one VPS. It's Apache 2.4.7, I remember trying long to set up name based Virtualhosts on localhost to find out Apache Virtualhosts are not supported anymore. (I cannot ...
2
votes
0answers
290 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 ...
2
votes
0answers
194 views

Replacement for DirectoryIndexRedirect for older versions of Apache

DirectoryIndexRedirect is available in version 2.3.14 and later. (mod_dir) Is there an alternative method for older versions? I have different DirectoryIndex directive sets for a lot of directories ...
2
votes
0answers
499 views

404 error on a file/directory that exists?

We are using the vBulletin system. I have set it up so that it redirects 404 error's to a php page, so it follows the theme of the forum. However, if I go to a directory that exists (the admin ...
1
vote
0answers
72 views

Google can't crawl my rewritten URLs

I tried to submit my robots.txt and sitemap.xml for hours now - changing directories and .htacces rules like a horse. For some stupid reason Google can't crawl my pages and gives me warnings, that my ...
1
vote
0answers
28 views

Using SetEnvIf to not log overly accessed URLs

I'm trying to figure out how to craft my SetEnvIf's in my apache config so that the server hard disk isn't spinning 24/7 over log entries. What I want to do is disable logging for all domains and ...
1
vote
0answers
21 views

Could an .htaccess affect charset options in another directory?

My company is still running a ~12 year old CMS for project management and until yesterday it was working fine. Then I uploaded a version of Tiki Wiki CMS to complete separate folder on the same ...
1
vote
0answers
25 views

False Duplicate Content On Moz Report

We are using Salesforce's Visualforce to run one of our websites. We use Moz to monitor SEO issues. Moz has identified more issues pages than we have - see the attached image. We have only a few ...
1
vote
0answers
42 views

Problem with http to https redirect

I have the following .htaccess file (in www.example.com/folder1/folder2) RewriteEngine On RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L] to map any HTTP request ...
1
vote
0answers
72 views

URL masking to subdomain redirecting to subdomain

I am trying to change the URL of a Joomla site in browser my original URL is like example.com/marketsite/abc and I want to change it to abc.example.com/marketsite/abc I am using following code ...
1
vote
0answers
94 views

Random domain pointing to my domain

A random person has pointed their domain to my website. I don't have much experience with websites, but I know a bit. What can I put in .htaccess to give a 403 error if they try to access from a ...
1
vote
0answers
44 views

How to Exclude URL From PageSpeed Modification

I am currently working with the PageSpeed module and one of the URLs it is modifying I need to restrict. Here is the page I am looking at but it does not seem to have the solution for restricting the ...
1
vote
0answers
93 views

Parallels Plesk Apache dedicated server shared IP / A Address serving default page

My Website Works when you go to it, however Google Adwords is telling me that my site is redirecting/ not showing up properly to their bots. When you put the site into a website checker like GT ...
1
vote
0answers
109 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
36 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
0answers
122 views

Redirect query string URL via .htaccess

I am trying to redirect all query strings to a new URL. Search query example www.example.com/?s=cars to resolve to www.example.com/?search_gcse/?q=cars ("cars" is just an example). What is the ...
1
vote
0answers
61 views

htaccess issue with URL masking

I am attempting to mask an URL using an htaccess file to only show the root URL. This is a Drupal 7 website, so I want the URLs to look like the following: Main page: http://www.site1.com Drupal ...
1
vote
0answers
99 views

Cloudflare putting my site in an endless refresh loop

This problem does not happen to all site visitors. The best I can tell, random users of Chrome have the issue but my sample size is way too small to believe that it is only Chrome. However, a few ...
1
vote
0answers
81 views

Using .htaccess rewrite rule that doesn't run for specific folders and files

I want to create a .htaccess file that reads index/somepage as index.php?q=somepage. This is how far I got: Options -MultiViews RewriteEngine On RewriteCond %{REQUEST_FILENAME} (gif|jpe?g|png|js|css|...
1
vote
0answers
390 views

Enable pagespeed_module in Godaddy’s Deluxe Linux Hosting

I try to enable pagespeed_module in Godaddy’s Deluxe Linux Hosting, the entire .htaccess is as below, <IfModule mod_rewrite.c> RewriteEngine On ## Forward non www to www RewriteCond %{...
1
vote
0answers
226 views

Can Apache .htaccess convert the percent-encoding in encoded URIs from Win-1252 to UTF-8?

I want to add a directive in my .htaccess, such that if the browser is pointed at a URI containing %E4 (ä) - or any other special character - the .htaccess automatically rewrites %E4 (ä) as %C3%A4 (ä)....
1
vote
0answers
258 views

ExpiresByType not working for PNG images when set in .htaccess for a WordPress site

In my website I have the expires headers settings reported below. When I use Google's PageSpeed Insights test I get the message: XYZ.png expire headers not set, which I'm getting for all the PNG files ...
1
vote
0answers
141 views

Setup WordPress multi-site installation to handle both subdomain.example.com and www.subdomain.example.com

I have installed a multi-site installation of WordPress onto my domain. I then added the necessary code to the wp-config.php file and .htaccess as instructed by WordPress. I also installed a plugin ...
1
vote
0answers
497 views

URL rewriting on multiple domains hosted on one GoDaddy account

Note: I think this question has been asked before but no clear solutions have been discovered. I had developed a site in PHP that uses clean URLs: For example: www.example.com/about www.example.com/...
1
vote
0answers
320 views

Is my .htaccess rule creating an infinite loop?

Whenever I type a made up address that includes a directory index it removes it. The problem is when the the address includes a forbidden subdirectory. It reduces itself until it hits forbidden. How ...
1
vote
0answers
117 views

How can I mask sub-directory to work as DocumentRoot for multiple domains pointing to the same location?

I am trying to mask sub directories to effectively work as DocumentRoot for multiple domains. e.g. I have two domains - domain1.com & domain2.com both pointing to the same location. I want ...
1
vote
0answers
61 views

optimize htaccess

I have two condition which are conflict RewriteRule ^patients/findadoctor/(.*)\.html$ subcategorydoctor.php?id=$1 [L,NC] and RewriteRule ^patients/findadoctor/(.*)\.html$ specilitydoctor.php?id=$...
1
vote
0answers
618 views

htaccess doesnt work in subfolder

I'm using xampp with apache on my windows machine. My directory structure is: C:/xampp/htdocs ---------------/Sync --------------------/ProtectedFolderA -------------------------------------/....
0
votes
0answers
30 views

Gzip compression not working

I have enabled mod_rewrite, mod_deflate, mod_headers and mod_setenvif in Apache and not mod_gzip, mod_filter. Tried <IfModule mod_deflate.c> # Compress HTML, CSS, JavaScript, Text, XML and ...
0
votes
0answers
25 views

Fastest .htaccess redirect from example.com to www.example.com?

Now using the standard cPanel-created Apache .htaccess redirect, but it's taking a full 2 seconds to go from ´example.com´ to ´www.example.com´. Is there a faster method? Or should I let go of the ...
0
votes
0answers
46 views

How to add http:// prefix to subdomain redirect in htaccess

I am rewriting a subdomain URL with a query (cart.example.net/ProductDetail.jsp?LISTID=7C0400-1101763508) to a www subdomain (www.example.net/product-category/product). The problem I am facing is the ...
0
votes
0answers
53 views

How to redirect all pages and all subdomains of a domain to the home page of another domain

I have an domain (www.aaa.com) and an alias (www.bbb.com). The alias domain points to the aaa.com domain, but that's not what I want. I want www.bbb.com to point to www.ccc.com. I have the following ...
0
votes
0answers
40 views

Hosting htaccess redirect subdirectory to subdomain

I have simple hosting plan with domains included: Now I have the domain.com and seconddomain.com now I want to use all that domain and give them his own root directory. If I use the controle panel ...
0
votes
0answers
258 views

redirecting bots and crawlers to another but not human via htaccess

I would to apply this diagram via htaccess I tried a lots of codes but I failed every time so I need to redirecting bots and crawlers especially from facebook via htaccess regards
0
votes
0answers
79 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 ...
0
votes
0answers
21 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
0answers
68 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 ...
0
votes
0answers
146 views

How to allow access to subdirectory in website using htaccess?

I am wanting to create a seperate directory for my analytics program to function. My website is www.loosebruce.co.uk and I want my directory to be accessible as www.loosebruce.co.uk/analytics The ...