Directory-level configuration file found mostly on Apache web servers

learn more… | top users | synonyms (1)

-2
votes
1answer
24 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
votes
1answer
32 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
1answer
30 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
104 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; ...
-1
votes
0answers
17 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 ...
2
votes
1answer
47 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
57 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
27 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
51 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
1k 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 ...
2
votes
2answers
964 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
35 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
0answers
46 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
45 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
188 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
1answer
46 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
99 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
72 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
38 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
76 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
244 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
62 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
55 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:- ...
1
vote
1answer
65 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
32 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
12 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
15 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
99 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 ...
2
votes
4answers
10k views

How to prevent infinite redirect loop on htaccess?

Our domain.com/app/index.php is loading domain.com/blog in an iframe. So my redirect rules should be like; - domain.com/ => /app/index.php - domain.com/blog(.*) => ...
0
votes
0answers
68 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 ...
1
vote
5answers
4k views

You don’t have permission to access /index.py on this server

I am setting up a simple test page in Python. I only have two files: .htaccess and index.py. (Permissions for both set to 755) I get a 403 Forbidden error when trying to view the page - how can I fix ...
0
votes
2answers
3k views

Redirect all http AND https non-www URLS to https://www.example.com via htaccess

For reasons much too long and complex to get into (it involves several layers of corporate red tape resulting in someone else not purchasing a wildcard SSL certificate I requested), I have to set up a ...
0
votes
1answer
35 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
82 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
118 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
65 views

Apache not responding to configuration changes

I have an Apache server running the latest 2.2 version on Ubuntu 12.04.4 LTS. I haven't changed most of the configuration. Everything worked fine at start, but now it's not noticing any changes to its ...
0
votes
1answer
33 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 ...
0
votes
0answers
14 views

Doubts on 404 because htaccess - What is happening here?

I have a WP instance, and I see that any time I write a URL that has any string that contains 'moz' it errors out with a 404. I have taken a look at my .htaccess looking for 'moz' and I see this: ...
0
votes
1answer
56 views

VirtualHost Redirect should work with new RewriteBase

Inside the VirtualHost I got this redirect: RewriteBase / RewriteCond %{REQUEST_URI} wp-content/uploads/([^.]+\.(jpe?g|gif|bmp|png))$ RewriteRule (.*) http://example.org/$1 [R=301,L,NC] So the full ...
1
vote
2answers
203 views

Thousands of robots.txt 404 errors from bots trying to crawl old multisite

Current situation is that we are getting thousands and thousands of 404 errors from bots looking for robots.txt in different places on our site due to domain redirects. Our old website was a ...
1
vote
1answer
18 views

.htaccess AuthType not what I expected

I'm working on a new project at work in PhP, and have come across something I'm unfamiliar with/can't find any help with. In the .htaccess file for the directory I see AuthType UWNetID require ...
0
votes
2answers
2k views

removing ? and = from php get method

well wat im trying to do is to remove the Question mark from the url like, im using a form and the action of it is lets say city.php depending on wat u enter on the form the url will be like ...
1
vote
0answers
30 views

.htaccess password protect multi storeview magento

I'm currently working on a Magento site with 2 different domains/2 storeviews in one Magento installation. Let's say we have www.domain.com and www.domain2.com. I want www.domain.com to be ...
-3
votes
1answer
57 views

How to block unknown browsers in .htaccess?

I wanted to know that How to block unknown browsers in .htaccess? there is a variable in htacess called : BrowserMatchNoCase but I don not know how to work with it
1
vote
1answer
421 views

Windows Active Directory Authentication and XAMPP Apache server [closed]

I installed XAMPP server in my Windows 2008 server and I want to restrict access to htdocs folder so only users in active directory could see my intranet website. I enabled following modules in ...
1
vote
1answer
210 views

How to add rewrite rule for redirecting url in Apache Web Server

I am trying to configure autodiscover feature of outlook and thunderbird for my mail server. I have added a virtualhost entry with following rewrite rule to redirect config-v1.1.xml to ...
0
votes
0answers
95 views

Cannot get media type from 'x-mapp-php4' in Apache log file

My Apache error log has the same set of error messages regularly. The particular set of error messages total around 17 lines so I've used Pastebin: http://pastebin.com/UfG3vQtn You will see there is ...
0
votes
1answer
161 views

htaccess redirect HTTP & HTTPS non-www to HTTPS www

How can I redirect my website from all HTTP requests to HTTPS + non-www HTTPS to HTTPS with www.? Example: Redirect HTTP non-www, HTTP www. & HTTPS non-www: HTTP:// example.com/ && ...
1
vote
1answer
131 views

.htaccess Rewrite Rule not rewriting alias

I am attempting to serve up a different robots.txt for alternate subdomains that I am using for domain sharding so that google doesn't index m1.example.com and m2.example.com. ...
0
votes
1answer
41 views

How to change image folders and domain with mod_rewrite?

I have images like this - http://www.site1.com/upload/long/long/long/long-path/image.jpg I need redirect all images in folder upload to another site and strip path. Example ...