Directory-level configuration file found mostly on Apache web servers

learn more… | top users | synonyms (1)

-1
votes
0answers
10 views

Redirect with mod_rewrite for apache web server

I have a sudomain app.example.com pointing to a directory named /app It contains a folder called uvf with an index.html file. I am trying to redirect all automatically generated links like ...
0
votes
1answer
41 views

htpasswd - Any tip to block brute force attacks?

Update: As Craig suggested I'm trying fail2ban now. Even though I have issues in that as well. failregex is not finding any result though. I had enabled all apache* in jail.local and here is how my ...
0
votes
1answer
12 views

Conveting .htaccess to Ngix rules

I need to convert htaccess file to nginx config. I http://winginx.com/en/htaccess but an error occurred when I update the nginx config file. The htaccess file reads: DirectoryIndex index.php ...
0
votes
0answers
6 views

Autodiscover URL redirection from cPanel Apache to different Subdomain URL on an IIS/Exchange server

== The Current Situation: == We have a web and DNS server for contoso.com (10.10.10.1) This web server 10.10.10.1 is also the mail server for @fubar.contoso.com We then have another server for MS ...
-1
votes
0answers
14 views

htaccess rewrite url twice

just a thought, is it possible to rewrite url twice in htaccess? say i have www.example.com/sub/sub/page.php i rewrite to www.example.com/index.php?url=sub/sub/page.php without redirecting the ...
0
votes
0answers
27 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
30 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
1answer
24 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
18 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
44 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} ...
0
votes
0answers
16 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 ...
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 ...
-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 ...
1
vote
0answers
13 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
1answer
31 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
1answer
24 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 ...
-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) ...
-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 / ...
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
vote
2answers
45 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
37 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
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
1answer
22 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 ...
-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
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
68 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
30 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 ...
1
vote
0answers
72 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
26 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
46 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 ...
0
votes
0answers
41 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 ...
1
vote
0answers
115 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 ...
-4
votes
1answer
53 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
1answer
35 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
1answer
35 views

apache robots.txt with SSL

I have an .htaccess file with a rewrite rule to get a redirect of every HTTP request to HTTPS. But now I have a problem that my robots.txt is not recognized by some online checker. If I remove the ...
-1
votes
1answer
25 views

Overload Protection

Is there a simple way how I could redirect a visitor (via .htaccess or PHP script) to a static page when the server is overloaded from too many requests? It doesn't have to be a protection against ...
0
votes
0answers
11 views

Setting up .htaccess with various pages and query vars

I am wanting to set up multiple rules, and so the system can be expanded I am wanting to use %{REQUEST_FILENAME} rather than having multiple rules set up. My structure at the moment is: ...
0
votes
0answers
35 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
0answers
12 views

htaccess negation rule not being followed

I'm working on a wordpress blog. The .htaccess file for it includes this block: <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond ...
2
votes
1answer
78 views

htaccess order Deny,Allow rule

I'd like to dynamically add IPs to a block list via htaccess. I was hoping someone could tell me if the following will work in my case (I'm unsure how to test via localhost). My .htaccess file will ...
0
votes
0answers
41 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:- ...
0
votes
0answers
50 views

Rewrite rule Mod_Proxy truncate file name

I search online for the solution, but nothing :(. I write this simple rule RewriteRule ^(.*)$ http://www.mysite.com/$1 [P,NE,QSA,L] In mysite.it i have an .htaccess with this rule and it's ok, but ...
0
votes
1answer
64 views

Redirect Port 80 request to 443 for site

I managed to redirect my requests from port 80 to 443 using the redirect permanent. However, there is a problem. On my page there is a link to /forum/. When one clicks the link it tries to go to ...
0
votes
1answer
31 views

.htaccess rules not working, but the file seems to be loaded

I am trying to remove .php at the end of the URL from any page thats loaded. RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}.php -f RewriteRule ^(.*)$ $1.php ...
0
votes
1answer
69 views

Redirect one domain to another's sub folder [closed]

I have a domain www.example.com that is shutting down, but I need to forward it to www.newwebsite.com/example/ incase there are any SEO benefits to it. The www.newwebsite.com is hosted on a LAMP ...
0
votes
1answer
27 views

301 redirect on same hosting server

I originally bought the domain http://example.com with a hosting package and have run a Wordpress blog on that for a while. Now I've bought an added on domain http://example.com.au and have ...