Directory-level configuration file found mostly on Apache web servers

learn more… | top users | synonyms (1)

0
votes
1answer
100 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
1k 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
67 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
110 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
103 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 ...
2
votes
1answer
975 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
96 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
238 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
228 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
108 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
148 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
477 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
83 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
89 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
148 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
79 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
14 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
33 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
216 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
11k 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
90 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
1answer
49 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
690 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
212 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
83 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
41 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
157 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
286 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
23 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
3k 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
61 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 ...
-4
votes
1answer
71 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
920 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
340 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
148 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
1k 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
359 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
90 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 ...
0
votes
1answer
35 views

htpasswds loads site after failed authentication

I'm having an issue with htpasswds on a dedicated server with cpanel/whm where the visitor can simply click the "cancel" button several times on the htpasswds pop up and it will load the site but ...
0
votes
1answer
164 views

Change the value of MaxRequestLen via .htaccess?

Is it possible to change the value of MaxRequestLen without root access to my Apache 1and1.co.uk dedicated server (managed version)? I was hoping to be able to change the value via .htaccess? Does ...
-1
votes
1answer
156 views

Rewrite only if Image don't exists with .htaccess

How do I make RewriteCond+RewriteRule change site1.com/folder1 to site2.com/folder1, only if file in this directory don't exist. For example: site1.com/wp-content/uploads/2014/03/image.jpg If image ...
-1
votes
1answer
42 views

Point a new domain at existing files but keep new domain url

I have a directory: http://mysite.com/somedir/ I have a new domain: http://myothersite.com I want my new domain to point to the files in http://mysite.com/somedir/ but retain it's own url. So that a ...
7
votes
4answers
16k views

How to solve “ExpiresActive not allowed here” error message in .htaccess file?

I am trying to add Expires headers to the HTTP responses of the site I am working on. The only way for me to control the Apache 1.3 server is by editing my .htaccess file. I tried adding code such as ...
-1
votes
1answer
30 views

Disable custom php.ini

I want to disable custom php.ini inside my shared hosting. I dont want to allow my clients to use it. I could block the usage of htaccess using allowverride but I cant see someway to block php.ini!
2
votes
2answers
152 views

.htaccess redirect visitor if he has a cookie is from accounts.google.com [closed]

I am creating a gateway page that redirects visitors based on what services they are using. How should a .htaccess rule that redirects a visitor if he has a cookie originating from the domain ...
-1
votes
1answer
58 views

Mod rewrite htaccess worked on old server, not on new server

I have the following .htaccess file, which worked fine on my old host. I moved over to an AWS instance (Ubuntu 12.04 LTS), and it's no longer completely working: <IfModule mod_rewrite.c> ...
1
vote
0answers
50 views

Password protect website

I'm trying to password protect my website from ONE ip address. I just want to restrict an ip from accessing my website, but still allow them to access it if they have the password. My current code ...