Directory-level configuration file found mostly on Apache web servers

learn more… | top users | synonyms (1)

0
votes
1answer
8 views

Install .hraccess files in VPS

I cant use in my VPS RewriteRule and forwarding in .htaccess files. I have install apache2, but I cant usage this files. Why? How install .htaccess in VPS?
0
votes
0answers
6 views

I need a .htaccess RewriteRule that converts a query to a directory structure

I need this: http://website.com/page/request.php?id=1 To look like this: http://website.com/page/1 Ive already tried this but it does not work. RewriteRule ^=([^/d]+)$ request.php?id=$1
0
votes
1answer
18 views

Apache keeps returning 500

(Im working with Apache/2.4.10 on Windows 7 (64 Bit) ) I have a directory "test" in my document root with several files on my local apache: test |____.htaccess |____.htpasswd |____admin.php ...
1
vote
1answer
10 views

How can I force mod_rewrite to send user info component of a URI?

A colleague recommended I repost this from StackOverflow to ServerFault: This has been driving me crazy. I have a web application that's being served via Apache Web Server. The database server that ...
-2
votes
1answer
18 views

Equivalent of .htaccess in NGINX

I have the following .htaccess file. I am trying to configure this on NGINX with no luck. .htaccess RewriteEngine On RewriteCond $1 !^(index\.php|resources|robots\.txt) RewriteCond ...
0
votes
0answers
11 views

Can't redirect HTTP to HTTPS for subdirectory [duplicate]

The following code (in my root level .htaccess file) should redirect http://www.pillerdesigns.com/iwp/ to https://www.pillerdesigns.com/iwp/ (non-SSL to SSL): RewriteCond %{HTTPS} off RewriteCond $1 ...
1
vote
1answer
30 views

Redirect IP to a domain name using htaccess

Let's say I have this IP Address 11.12.13.14 and the domain example.com. Now what I want is to redirect the user from IP Address to domain name (but without changing the domain name to address bar). ...
1
vote
1answer
23 views

Apache security - list all possible handlers / actions

To ensure there aren't security weaknesses that can be exploited via .htaccess, how can we see all possible handlers that Apache can use via directives like SetHanlder and AddHandler. I know I can ...
0
votes
0answers
8 views

Set 1 cookie on 2 different subdomains

I am trying to get one cookie to work with 2 domains. Currently using an agreement page once a users first views the website that it will come up and they have to accept the ToS to continue, however ...
-1
votes
0answers
10 views

.htaccess block the css, img, js under the public folder

I'm facing a very weird situation that my website can load the img/css temporarily and running successfully, after a short while, it loss the connection to this public folder, which includes ...
-1
votes
1answer
15 views

how should I 301 redirect https address to http address?

I have recently moved my website to a new domain. The previous domain had SSL installed and it was https://example.com. My new domain is http://newexample.com and It doesn't have SSL on it. I used ...
0
votes
0answers
17 views

Combining .htaccess with http.conf to set https and direct all routes to index.php

I'm sure this question has been asked before, and I have tried to understand many of the answers given, however none of them seem to work with my particular set up. If the question can be answered ...
0
votes
0answers
19 views

404 Not Found or 500 internal server error using nginx try_files configuration

I'm trying to move my project from Apache to nginx. I use WT-NMP. I'm converting .htaccess to nginx configuration by adding this in nginx.conf. location / { try_files $uri $uri/ /index.php/$args; ...
-1
votes
1answer
33 views

Laravel: default route will render but others will not. Ubuntu/14.04 / Apache2 configuration issues? Not sure what I am doing wrong

Laravel will render the default / root page normally. but will not render default routes or error pages. My web browser will return with Apache (NOT Laravel) error pages with I try and access /test ...
0
votes
0answers
14 views

htaccess redirect with regular expression [duplicate]

Some redundant pages are being created in the website. Eg, archives/volume41/number21/calls- archives/volume52/number19/calls- archives/volume66/number7/calls- archives/volume70/calls- ...
0
votes
0answers
42 views

Apache Header Module Loaded but can't set headers in htaccess

I have Apache 2.2.29 (unix) setup and running on my new dev machine (mac). I am trying to set CORS headers for an API project - something that I have done many times. The htaccess file for the ...
0
votes
2answers
78 views

Setting Access-Control-Allow-Origin in .htaccess for Https protocol

I have a site with http and https. I set in the .htaccess the following line which runs for http. Header set Access-Control-Allow-Origin "*" But with https I get this error. No ...
0
votes
0answers
11 views

Apache2 as ReverseProxy Using htaccess; Limit acces to subdirectory with different user than to root folder

I have a WebApplication behind a Apache2.2, which is used as a reverse proxy. Now I want to limit access to the root folder of the application and to the subfolder docs. However I need different users ...
0
votes
1answer
48 views

htaccess - redirect non https & set different default page for each sub-domain [duplicate]

I have a wild card ssl for my domain. I have many subdomains each with its own default page. www.domain.com/main.html     [/home/domain/main.html] ...
0
votes
1answer
27 views

apache mod_rewrite rule not working [duplicate]

I'm testing the rule below else where and it's working but on my system it's not (centos 7, Apache/2.4.6) [I changed my domain to domain.com for the post here] the purpose of the rule is to rewrite ...
0
votes
1answer
27 views

filename repetition unwanted but from Apache 2.2 .htaccess RedirectPermanent

On Apache httpd 2.2, my .htaccess is failing when I RedirectPermanent to a file within a subdirectory, but it's fine if the destination file is at the website's root level or is the ...
-1
votes
1answer
36 views

website uses an invalid security certificate

I have website on ubuntu with apache server. Domain is from godaddy. When I type example.com it's running file under SSL (with https). But, for www.example.com it's giving me below error. ...
-1
votes
0answers
25 views

Apache webserver configuration/access to only index.php

I'm trying to the below with Apache/2.4.6 (CentOS) webserver installed using yum. I've got my php pages served from /var/ww/html/project1 index.php is a symbolic link that points to a login page ...
-2
votes
1answer
25 views

htaccess without redirect HTTP & HTTPS non-www to HTTPS www

i have SEO problem for http to https and non-www to https://www Please help me how to solve this problem? this is my htaccess code: RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteCond ...
1
vote
2answers
61 views

CentOS - Apache HTTPS not reading htaccess

I have been stuck with an issue with rewrite on apache on CentOS. If I load my site from HTTP, it works fine. Rewrite rules work. Once I change it to HTTPS, the rewrite rules don't work. After some ...
0
votes
2answers
35 views

Apache access control not behaving as expected

I have a static HTML website that being served by Apache 2.4 using SSI. I have been using basic authentication to control access to a subset of files and it has stopped behaving as expected. ...
0
votes
1answer
137 views

how to remove .php extension using htaccess on godaddy linux hosting

How to remove .php extension using htaccess file. I have tried many codes (which I found on internet but not got success. An Internal server error is regularly showing. I am using Godaddy Linux ...
0
votes
0answers
23 views

Subdomain only read the index file

This is the structure of the directory: +example.com +public_html +assets //assets directory of example (css,js,img) -index.html //the index file for example +subdomain ...
0
votes
1answer
18 views

Redirect all vhosts when a certain condition is true

I am trying to redirect all vhosts to a certain url based on the REQUEST_URI. For example if somebody makes a request to www.something.com/condition on my server to be redirected to google.com I ...
0
votes
0answers
11 views

Exclude 1 file from htpasswd in httpd.conf [duplicate]

I'm running a development server that's currently protected by .htpasswd pre launch, it's setup okay but I've tried to un password protect 1 file http://thesite.com/roost_manifest.json in the public ...
0
votes
0answers
33 views

Password protect folder and allow all subfolders (apache)

I'm trying to password protect one folder on my web site using an .htaccess file with an .htpasswd file. It works and I get it to password protect it. Can I add something to my folders .htaccess file ...
0
votes
0answers
22 views

SetEnvIf Work on Local But Not on Live

I'm trying to set a variable MAGE_RUN_CODE for Magento in .htaccess depending on the domain name. I have the following on my local MAMP installation, and it is working as I'd like. I have two sites: ...
1
vote
1answer
28 views

Redirect Webmail traffic through port 80?

I have set up a website on BlueHost (shared server) and I have set up webmail in a subdirectory. But every time I use the url mywebsite.com/webmail, it gets rerouted to mywebsite.com:2095 which ...
0
votes
0answers
10 views

Denying access to autogenerated file in Apache and Magnolia

I have several virtualHosts in a machine with magnolia working on it. Magnolia auto-generate a sitemap's file so I'm trying to deny its access with Apache 2.4 I've tried this: <FilesMatch ...
0
votes
1answer
19 views

htaccess rewriting same page names conflict

My htaccess file has the following two lines RewriteRule ^payment payment.php RewriteRule ^payment-confirmed payment-confirmed.php When trying to access payment-confirmed.php it just goes to ...
0
votes
0answers
7 views

Redirect 2 different domains to 2 different directory + .htaccess [duplicate]

Here is my directory structure: root root/exampleA root/exampleB How to redirect example.com/A to exampleA directory and redirect the rest of urls to exampleB.com
0
votes
1answer
159 views

AH01630: client denied by server configuration Apache

I get this error when trying to access localhost via a browser. 403 Forbidden I use Ubuntu 14.04 LTS Here is my configuration file: etc/apache2.conf # This is the main Apache server ...
0
votes
1answer
16 views

If mod_expires is used in .htaccess will modified files be downloaded by the client

I'm trying to employ caching to speed up the response time of a website. Most of the documentation I have read suggests setting expiration to +1 month from time of access as follows: ExpiresActive On ...
0
votes
1answer
31 views

“deny all” for all files in a directory

My server is getting hit hard by bots, etc., looking for various files in /cgi-bin/, like search.cgi, YaBB.pl, gitweb.perl, perl, gitweb.pl, htsearch, and on and on. I want to deny all access (send a ...
0
votes
1answer
9 views

Failure htaccess regax

I'm trying to get all request to the server to go to the index.php file with the request information. Also, I want to prevent accessing the index.php file directly. The second part works fine but I ...
0
votes
1answer
36 views

Allow Parent .htaccess to redirect all assets

We're migrating from one subdomain to another. This particular domain has a subset of several websites. I've setup the following rewrite to handle the redirect globally: In docroot/.htaccess ("Rule ...
0
votes
1answer
44 views

(VPS Cloud) Site goes down, htacces modified, i think due to high traffic [closed]

i have a cloud vps at ovh having 8GB of ram, a 6 vCores processor and installed Parallels Plesk 12 on Ubuntu 14.04 (64 bits) I have more than 10 sites in there but only 2 have traffic From histats: ...
0
votes
1answer
39 views

Using a .htaccess file to set specific expire rules for different folders

I have 5 symlinked folders on my website that are pulling data folders that are located in the home folder of my hosting. /home/public_html/myfolder symlink points to /home/folder1/ the pages are ...
0
votes
0answers
68 views

.htaccess rules not working or renaming

I am deploying a legacy site on a server running Ubuntu 14.04 version. This site was developed using Symfony framework 1.4 and it was originally deployed at a shared server, thus redirections between ...
1
vote
0answers
18 views

Converting .Htaccess Rewrite Rule to Nginx

I have the following apache rewrite rule which I am trying to convert to work with nginx. RewriteRule ^(.*)\/(.*)-(\d{4})(?:-(.*))?$ album.php?artist=$1&album=$2&releaseyear=$3&extra=$4 ...
2
votes
2answers
129 views

.htaccess Lost SESSION after header redirect using mod_rewrite [L, QSA] with started session

PHP version 5.4.41 Apache version 2.2.15 Linux version 2.6.32 CentOS 6.6 I have some code that won't redirect properly. There is a lot of code and configuration, so I'm going to try and keep it as ...
0
votes
1answer
18 views

cname to subfolder re-write with htaccess

what I want to do is redirect: images.example.com/filename to example.com/images/filename I tried: RewriteCond ${REQUEST_URI} ^(images)/(.*)$ RewriteRule ^(.*)$ http://example.com/images/$1 ...
0
votes
1answer
90 views

Why doesn't my .htaccess work on this VPS?

I have the following .htaccess file in /public_html/.htaccess: # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond ...
1
vote
2answers
57 views

Combine http to https and domain redirects using mod_rewrite

I'm trying to redirect www.example.com to a hosted blog at https://www.example.wordpress.com. The domain redirect works, but gives me a 403 error because it's redirecting http to https. Example.com is ...
0
votes
0answers
31 views

fallbackresource vs htaccess which one?

I have a website that uses .htaccess file. After digging for a problem I had, I found that I can use FallbackResource. It makes everything way simple on the apache configuration but more work on the ...