Directory-level configuration file found mostly on Apache web servers

learn more… | top users | synonyms (1)

0
votes
0answers
16 views

Showing only domain with .htaccess and mod_rewrite

I currently have koken installed to my website (wythDOTno-ipDOTbiz/koken). I know that the .htaccess file in the koken folder is working, because it is making the url's clean by removing the ...
0
votes
1answer
20 views

htaccess and rewrite - Internal redirect within Alias

I have the following .htaccess within a subdirectory: RewriteEngine on RewriteRule ^file.js$ file.php This works by internally redirecting the request to the PHP file, with the same name, which is ...
0
votes
1answer
23 views

mod_expires doesn't set expiry for images (png,jpeg,gif)

I am using this below configuration in my apache2.conf <IfModule mod_expires.c> ExpiresActive On ExpiresByType image/gif "access plus 6 month" ExpiresByType image/jpg "access plus 6 ...
0
votes
2answers
684 views

Why is .htaccess not allowed in a directory but is allowed in another?

I have apache2 installed on ubuntu 10.4 inside my var/www/ directory [amung others] I have a cakephp and a dvdcatalog directories. Each of which have CakePHP 1.3 installed. I can access them both ...
0
votes
1answer
17 views

can htaccess file define different RewriteBase for production and dev servers

I have htaccess files that use different RewriteBase on production and dev (windows) pc. Currently I change the RewriteBase manually when deploying. Can this be done automatically with some ...
1
vote
0answers
41 views

Why can't I redirect url's with “index.html” in it to a php file?

I'm stuck in a big problem, but let me start with one part of it. I am wodering why this works: RewriteRule ^(.*)index.html $1 [R=301,L] while this doesn't: RewriteCond %{REQUEST_FILENAME} ...
1
vote
0answers
5 views

Tomcat 8 with Apache, Configure Several Java & WordPress Domains

** PROBLEM SUMMARY ** I think the subject line defines my question pretty well, but I'm going to give an example of my current and goal setup for clarification. Considering the sheer number of ...
0
votes
0answers
13 views

Multiple Rewrite rules not working in htaccess file (mod_rewrite)

Can anyone help me how to write multiple rewrite rules in htaccess file. In my condition I want to remove index.php from url and also want to use file based cache busting, I am using following code in ...
2
votes
1answer
650 views

Apache deflate ignores javascript

I have set up deflate in my htaccess. Everything works fine, except for some reason javascript files are being ignored. I tried every possible combination of AddOutputFilterByType DEFLATE with ...
0
votes
1answer
978 views

Server error 500 when adding .htaccess file in the root folder

I read a lot of server error 500 questions related to the famous .htaccess file but I have still not found an answer to this error. I have a folder which I used to test the .htaccess file. ...
2
votes
1answer
2k views

How to exclude a sub-folder from HTaccess RewriteRule

I have WordPress installed in my root directory, for which a RewriteRule is in place. I need to password-protect a subfolder ("blue"), so I set the htaccess in that folder as such. Problem is that ...
0
votes
0answers
18 views

How to allow access to the site root document in htaccess?

What I am trying to accomplish looks quite simple: allow the site's index.html for everybody and hide everything else from everybody. Needless to say the index.html file can be addressed as ...
1
vote
2answers
657 views

Apache is giving a 500 Internal server error on a sub domain created for my domain

I have created a subdomain by name http://admin.stenzsolutions.com and just to test the sub domain, i have hosted the same content as the main domain http://www.stenzsolutions.com Now i have ...
0
votes
2answers
676 views

Apache RewriteRule - Proxy flag not working

I'm having a problem running Apache 2.2.20 on a Linux Mint distro. I've got the following rule in my .htaccess file: RewriteEngine on RewriteRule old1/old2 http://localhost/new1 [P] When I browse ...
-2
votes
1answer
19 views

Redirect entire site to URL with 302 - All URLs to 1 URL [duplicate]

What i want to do is redirect an entire forum temporarily to a Twitter Page. However anything i've tried hasnt worked. If they visit for example site.com/Forum it will send them to ...
3
votes
1answer
2k views

Error headers: ap_headers_output_filter() after putting cache header in htaccess file

Receiving error: [debug] mod_headers.c(663): headers: ap_headers_output_filter() after I included this within the htaccess file: # 6 DAYS <FilesMatch ...
-1
votes
1answer
22 views

IIS (or .htaccess) URL Rewrite not working correctly - need to capture number argument as query string

I'm trying to have: http://sub.domain.org/123456 become http://sub.domain.org/index.php?q=123456 I have tried many ways, and one way sort of worked, but then all subdirectories (including images) ...
0
votes
2answers
2k views

.htaccess - Too many redirects

I am getting a "too many redirects" error from the following two .htaccess files. .htaccess on domain 1 Redirect 301 / http://www.domain2.com/ .htaccess on domain 2 RewriteEngine On RewriteBase / ...
0
votes
1answer
23 views

How to use # in url as a redirect rule in htaccess for apache

I am having a difficult time figuring out how to have the following work: I am trying to redirect a url in htaccess I am trying to redirect from example.com/test.html to example.com/index#test I ...
0
votes
1answer
30 views

.htaccess rules to stop DDoS POST flooding

We're under a distributed denial of service attack from traffic that looks like this: 49.146.161.175 - - [11/Jul/2014:00:43:42 -0400] "POST / HTTP/1.1" 500 557 "-" "Mozilla/4.0 (compatible; MSIE 6.0; ...
0
votes
0answers
14 views

PHP FPM with Apache 2.4 htaccess [duplicate]

I have an install of Apache 2.4 with PHP executing through FPM. <VirtualHost x.x.x.x:443> SSLEngine on SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP ServerAdmin ...
-1
votes
0answers
7 views

URL rewrite on a whole website but not on some URIs [duplicate]

it seems very tricky to get some custom rewrite rules when url are already rewritten. I have some basics rewrite rules in a htaccess file in my website's root dir. RewriteEngine On RewriteBase / ...
1
vote
2answers
39 views

apache 2.4, mod_proxy_fcgi not honouring .htaccess, work around needed

I am using apache 2.4.7 with mod_proxy_fcgi for purpose of passing through php to php-fpm (this will be used for shared hosting environment). The htaccess works fine for non php files, but once it hit ...
2
votes
1answer
29 views

How to make htaccess not redirect to http on form submission

Part of my .htaccess file forces https on certain pages (e.g. when user logs in, enters credit card information, etc.) while forcing http on all other pages. This seems to be the ideal setup for what ...
0
votes
1answer
36 views

redirect string to different url in nginx

I want to redirect a string to different URL in nginx. This what my vhost looks like and is working fine. server { listen 80; server_name secure.example.com; root /opt/tomcat/webapps/test/; ...
0
votes
1answer
21 views

mod_alias.c rule to redirect all subdirectories

A mod_alias newbie here. I found the rewrite rule below somewhere and have been using it to block bots and hackers that hit my site, looking for directories like HNAP1, wp, blog, etc. And it works ...
0
votes
1answer
33 views

How can I rewrite from /page to /xx/page, using htaccess & apache only?

Hi I have found many resources on mod-rewrite and Apache but I haven't been successful of making a working example. The example below works for ✓ WORKS example.com/en/page1.php ☞ ...
0
votes
2answers
935 views

How to rewrite from /page to /xx/page, using htaccess & apache only?

Visualise a three step jump sporting event, with the first two steps perfect in place and the third step launching into air, never coming back and eventually a crash! That is what this question boils ...
3
votes
1answer
1k views

Apache sends plain-text response when accessing SSL-enabled site without HTTPS

I've never encountered something such as this before. I was attempting to simply redirect the page to the HTTPS version if it determined that HTTPS was off, but instead it's displaying an HTML page ...
3
votes
2answers
1k views

URL Rewriting Problem

I'm trying to rewrite my URL's subdomain. http://username.domain.com will show content of http://www.domain.com/user.php?u=username but URL stay as http://username.domain.com . (I mean url masking) ...
2
votes
2answers
931 views

Apache2 & .htaccess : Apache ignoring AccessFile

Hi there here is my server configuration: DEBIAN 32Bits / PHP 5 / Apache Server version: Apache/2.2.3 - Server built: Mar 22 2008 09:29:10 The AccessFiles : grep -ni AccessFileName * ...
0
votes
1answer
900 views

Issues with htaccess URL Rewrite (specific for CPanel type hosting)

I have an application set up on Apache 2.2 CentOS (with cPanel). I am facing issues with htaccess. I have confirmed that mod_rewrite is working. My .htaccess file is laid out like : RewriteEngine on ...
0
votes
1answer
1k views

cant remove index.php from url in codeigniter

iam new in codeigniter frame work,i want to remove index.php from url and tried many times bt its not working..... here is my .htaccess file RewriteEngine on RewriteBase /test/ RewriteCond $1 ...
-3
votes
0answers
12 views

duplicate Content error? [duplicate]

I actually wanted say that - My current URL is – example.com/category/we-developer However, if any user is mistakenly putting extra characters after the '/', for example, ...
-1
votes
0answers
15 views

Duplicate Content error [migrated]

I actually wanted say that - My current URL is – www.example.com/category/we-developer/ However, if any user is mistakenly putting extra characters after the '/', for example, ...
0
votes
1answer
22 views

htaccess redirect from one domain to another domains subdirectory [duplicate]

I want to redirect this way: from www.example.com/link.php?a=1&b=1 to www.example.net/subdirectory/link.php?a=1&b=1 I tried to use this .htaccess which isn't working: Options +FollowSymLinks ...
0
votes
1answer
709 views

Apache htaccess with mod_expires Not Working for certain directories

I have a Joomla site that I am trying to enable caching using mod_expires. I have the .htaccess in the root of the site and have added the options as found on the page ...
0
votes
0answers
32 views

YSLow says certain CSS are not gzipped

YSlow keeps on telling me files like http://www.example.com/wp-content/plugins/q-and-a/css/q-a-plus.css?ver=1.0.6.2 are not gzipped while the gzip test tool at Feed the Bot mentions I am all good: ...
0
votes
1answer
27 views

htaccess rule for url not ending with certain words

I need to rewrite few urls if those url not ending with certain words. For example, i need to rewrite following url /category1/subcategory1/aproduct-url-title to ...
0
votes
1answer
63 views

Ubuntu Apache2 server not allowing CORS or reading .htaccess

I have a couple issues, the first is my apache2 server is not reading .htaccess I have apache2.conf setup like so: # AccessFileName: The name of the file to look for in each directory # for ...
0
votes
0answers
28 views

Redirecting domain to subfolder of other domain [duplicate]

I'm fairly new to this, so excuse me if this is a stupid question. My hosting party allows to only link one domain directly to a hosting package. Today I bought a new domain and I'm trying to link it ...
0
votes
1answer
33 views

rewrite rule does not rewrite url as expected

I have a problem with a CMS website, that normally generates readable urls. Sometimes it happens that navigation links are shown as www.domain.com/22, which results in an error, instead of ...
1
vote
0answers
68 views

Apache2 - 500 server error when trying to access .php file

I have a webserver (Apache2, configured on Ubuntu Saucy Salamander 13.0x). On this server I have the following file in question: /var/www/xxxxx.com/insertToDB.php Accessing this file using GET ...
0
votes
0answers
25 views

Redirect url get variables after rewriting htaccess

My original url was this: wwww.domain.com/car-details.php?merk=BMW&model=X5&titel=sale&car_id=3 I have Rewrite it into this: wwww.domain.com/BMW/X5/sale/3 By putting this in my ...
0
votes
0answers
24 views

.htaccess password not working

I've been trying to use .htaccess to password protect a folder for a website. Unfortunately I can't seem to get it to work. I'm not getting an error, but the password being set in the .htpasswd file ...
0
votes
1answer
43 views

deny from .htaccess with banned IP list from stopforumspam.com not working?

so i'm trying to use .htaccess to ban a large list (50,000) of suspicious spam IP addresses that i got from this site. the list is almost 1M in size when i add the deny from directive for each ...
1
vote
0answers
109 views

Apache SSL redirect loop

We are trying to redirect our site from http to https only. Everything we have tried in .htaccess has resulted in a redirect loop. If we manually type the "https://" in front of the url, our page ...
0
votes
0answers
39 views

.htaccess Not Working Despite AllowOverride All

Apache HTTP Server 2.2.22 Arch Linux i686 I am using the HTML5 Boilerplate .htaccess with WordPress Multisite, which requires two .htaccess files. I’m not sure which would take precedence, so I ...
-4
votes
1answer
51 views

Where is .htaccess? and should I do it server wide or per cpanel account? [closed]

I want to do this? http://betterexplained.com/articles/how-to-optimize-your-site-with-gzip-compression/ # compress text, html, javascript, css, xml: AddOutputFilterByType DEFLATE text/plain ...
0
votes
0answers
35 views

Changing the current URL but serving content from another (same domain) - ProxyPass?

I've been banging my head against the wall with this for months now so I hope someone on here will be able to finally advise what is needed for this. I have some URL's like this:- ...