Directory-level configuration file found mostly on Apache web servers

learn more… | top users | synonyms (1)

3
votes
1answer
181 views

.htaccess redirect not working for web alias

I have two domains at one.com: example.com and example.de I would like to redirect from example.com to example.de/en I wanted to use an A record so that example.com points to example.de and then use ...
1
vote
1answer
41 views

Having Difficulty Blocking Spam Website Visitors

I'm getting hammered by spam requests. I allow guest comments that require pending and got over 20,000 of them in a very short space of time. 99% are from Ukraine or China. To bypass this I have used ...
1
vote
1answer
43 views

Wordpress https://example.com not redirecting to https://www.example.com htaccess

I'm using WordPress and moved to https recently. I've had some issues since with the domain not redirecting properly. Currently it works OK but https://example.com is not redirecting to ...
1
vote
1answer
43 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, ...
1
vote
1answer
84 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 ...
1
vote
1answer
65 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
84 views

“Friendly URLs” rule in .htaccess interfering with some directories

My .htaccess is set up to remove .html from URLs as follows: RewriteEngine on RewriteCond %{http_host} ^example.com [NC] RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,NC] RewriteCond ...
1
vote
1answer
40 views

Getting 406 on IE after google redirects my site

I have a wordpress blog. When I search the posts from my site in google, the results appear and on clicking the result I can open that particular post on my site. But while doing the same on Internet ...
1
vote
1answer
117 views

htaccess sitemap.xml rewrite to /sitemaps/$_SERVER[“MYVAR”]/sitemap.xml

I am trying to update htaccess to write as following: htaccess sitemap.xml rewrite to /sitemaps/$_SERVER["MYVAR"]/sitemap.xml This rewrite should only occur if sitemap.xml is requested in root ...
1
vote
1answer
366 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
1answer
20 views

Leverage browser caching for WordPress images on media subdomain?

My website is built with WordPress and I'm using a combination of the plugins W3 Total Cache and Autoptimize to make my website faster. My settings seems to be correct and most optimisation efforts ...
2
votes
0answers
154 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 ...
1
vote
0answers
17 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
0answers
28 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
58 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
30 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
67 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
49 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
49 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
50 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} ...
1
vote
0answers
130 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
284 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
0answers
159 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
54 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
0answers
434 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 ...
1
vote
0answers
138 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
129 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
346 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 ...
1
vote
0answers
270 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
103 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
60 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$ ...
1
vote
0answers
455 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 ...
1
vote
0answers
407 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 ...
0
votes
0answers
5 views

HTTP to HTTPS Redirect, but make it cacheable redirect?

In an effort to speed up my small wordpress site. This was recommended to allow caching my redirects. Wordpress Settings has HTTPS for address. What are my options? Avoid landing page redirects ...
0
votes
0answers
22 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
52 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
27 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
0answers
38 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
12 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 ...
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
0answers
52 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
0answers
28 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
33 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 ...
0
votes
0answers
88 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 ...
0
votes
0answers
14 views

Minimalist RewriteRules but access directories, error pages, etc statically

I am fairly experienced with PHP, but am new to Python. I am generally familiar with mod_rewrite, though I still get mystified by it very often. I am now trying to write a new Python web application ...
0
votes
0answers
87 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 ...
0
votes
0answers
119 views

How can I change rewrite base using .htaccess, from my root directory to a folder?

My issue here is that I have a folder called "project" on my server, for a cms that I use. However when I click on a link in that file for example about.html, it loads a file outside the folder on the ...
0
votes
0answers
57 views

How can i do multiple 302 redirects in htaccess?

I'm currently using the following to redirect only 3-4 pages to new a site # Use PHP5.4 as default RewriteEngine On RewriteRule ^news1\.html$ https://www.example.com/news1.html [R,L] RewriteRule ...
0
votes
0answers
37 views

Domain forwarding to new sub domain not working

I've a site www.xyz.org which I've migrated to xyz.newsite.org. It has been more than a month but Google is still showing www.xyz.org in the SERP. I've migrated another site exactly in the same way ...
0
votes
0answers
285 views

SIMPLEST way to set up password protection for a static site, with basic admin UI?

I have a static site. I would like the simplest approach to password protecting a directory, with a basic admin UI for adding/removing users. I will have so few users that I don't care about ...