Directory-level configuration file found mostly on Apache web servers

learn more… | top users | synonyms (1)

-1
votes
0answers
10 views

Looking for a GUI for HTPASSWD, or a way to style the popup [on hold]

At the moment I am just using htpasswd authentication for my clients login to my dev server... I would really like to be able to style a landing page that has the htpasswd login functionality albeit ...
1
vote
2answers
72 views

.htaccess file not loaded for PHP files

I am trying to work out why my .htaccess is not being considered when loading a .php file. Below files sit in the webroot of my localhost. .htaccess # Cause a HTTP 500 test file.html <html>&...
0
votes
0answers
8 views

How to run codeigniter project in subdirecory of cakephp? [on hold]

I have one website in cakephp. In that website i want to run one codeigniter project which is already bulit. Please let me know is it possible if yes what i need to change in both the projetcs?
0
votes
0answers
30 views

RewriteRule return 404

I just setup apache on my raspberry PI. I've enabled the Rewrite Mode for shunk all the api request on the index.php. In my project root (of my rest api) I've configured the .htaccess as following: ...
0
votes
1answer
1k views

Apache: Request exceeded the limit of 10 internal redirects due to probable configuration error - WooCommerce

I have a woocommerce site. I have a recursive error in the Apache error.log: [Mon Nov 02 17:04:58.723578 2015] [core:error] [pid 2922] [client 172.31.12.207:19044] AH00124: Request exceeded the limit ...
1
vote
1answer
20 views

add trailing slash after removing .html extention

My website is non www ,it has wordpress in subdirectory and some static webpages in the root and other subdirectory i want to remove .html extention from the webpages in the root and the others ...
2
votes
1answer
3k 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
2answers
1k views

Enable Cross Origin Scripting on Nginx from retina.js to load files from another URL?

Im running a retina image plugin along with W3 Cache for CDN support. W3 cache moves images to S3, but the JS file won't server the files from there due to the difference in URL (it goes from h ttp://...
1
vote
1answer
15 views

Wordpress Permalinks and regular php files

I have Wordpress installed in the root directory and configured properly using permalinks. Alongside the Wordpress blog, I have a full-fledged custom developed php application with several pages. I ...
0
votes
1answer
1k 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 http://www.pactsoftware.nl/...
4
votes
1answer
4k 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 "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$"...
0
votes
2answers
90 views

Redirect using htaccess [duplicate]

I want to redirect all traffic from the root of my website to a subfolder on the same domain using .htaccess Can someone help me out here?
1
vote
2answers
1k views

.htaccess 301 redirect with regex

I am trying to fix a lot of errors in our old website regarding a thing with product pages having multiple URLs associated with a single product. I am hoping that I can use regular expressions in ...
0
votes
0answers
29 views

Use RegEx to redirect all of website EXCEPT one URL

I've been directed here by support at WPengine, but I'm not sure whether this question should be asked here or over on Overflow... I'm using RegEx to redirect all paths and pages of a sub-domain to ...
1
vote
1answer
25 views

How to send all HTTP error codes dynamically to one PHP file when access to all other files is denied?

I'm having the following situation, I'm developing an API. I rewrite all traffic to one PHP script named: route.php, using mod_rewrite like: 1: RewriteEngine On 2: RewriteCond %{REQUEST_FILENAME} -f [...
1
vote
0answers
15 views

.htaccess RewriteRule for directory based with two parameters [duplicate]

I need to redirect my webpage in the likes of /dir/script.php?a=123&b=foobar to /123/foobar I've found many answers for questions like this in this site, but none of them work for my problem....
0
votes
0answers
25 views

Error 500 with .htaccess Rewrite

<IfModule mod_rewrite.c> <IfModule mod_negotiation.c> Options -MultiViews </IfModule> RewriteEngine On # Redirect Trailing Slashes If Not A Folder... ...
0
votes
4answers
3k views

How to block Ip in .httaccess on Apache 2.4

I've upgraded Apache 2.4 and would like to block an Ip this could be done by using the following in the .httaccess on Apache 2.2 Order Deny,Allow Deny from 50.62.136.183 However how can I achieve ...
0
votes
2answers
1k views

Redirect page/subfolder to new domain url without changing url in browser

I have been looking for an answer this without any luck (searched everywhere) Basically, I want to rewrite a page (subfolder) to a new domain without changing the url. I've tried with no luck: ...
0
votes
0answers
10 views

shell script hijacked my .htaccess files [duplicate]

Posted this on SO but was led here. I run a wordpress website and last night somehow a user was able to upload a shell script onto my server. This executed some linux commands modifying my .htaccess ...
0
votes
1answer
3k views

.htaccess Rewriting Tomcat Server

I am writing a website using Railo. My code is to be deployed on a Railo Server running on Tomcat, overlayed on a regular Apache+PHP server. I need to send all requests to http://subdomain.myserver....
-3
votes
0answers
36 views

redirect from non www to www works only with one virtualhost [closed]

I have 2 virtual hosts on my server. Each site has htaccess that should redirect non www to www. In case of example1 everything works. Testing by curl -I http://example1.com gives me HTTP/1.1 301 ...
1
vote
0answers
10 views

Laravel project in subfolder of public_html gives trouble with .htaccess redirect [duplicate]

I've set up my VPS server and am trying to set up a Laravel project. I have a /public_html/ folder with an index.html that's shown when visiting the website URL. I have a laravel project in: /...
0
votes
0answers
22 views

Apache 2.4 .htaccess

So I'm attempting to configure a server with Apache 2.4. I've got most things working, except for the .htaccess file. I've read through a couple posts/guides and I'm almost certain that my config is ...
0
votes
1answer
30 views

.htaccess: password required two times for the redirect function

I have the following .htaccess file: RewriteEngine On RewriteCond %{HTTP_HOST} ^example.de [NC] RewriteRule ^(.*)$ http://www.example.de/$1 [L,R=301] RewriteBase / RewriteCond %{REQUEST_FILENAME} !...
1
vote
1answer
38 views

NGINX index.php rewrite rules wont work

Recently I changed my webserver from cpanel and CENTOS 7, to use nginx with an scipt called nDeploy, wich works well with wordpress and the sites hosted on my server. I have this script wich is not ...
0
votes
1answer
29 views

Apache htaccess redirect http/www to https/non-www [duplicate]

To redirect from - http://www.domain.com - http://domain.com - https://www.domain.com to https://domain.com im using the following (apache)htaccess: <IfModule mod_rewrite.c> ...
0
votes
2answers
11k views

Removing php extension with .htaccess does not work

I use the following code on my site elixnews.com to remove php extension from: RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond ...
2
votes
1answer
1k 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
14 views

.htaccess 301 redirect for https and www [duplicate]

I'm struggeling with the apache rewrite engine and need help to transform these address-variations: http://www.site.de/index.php www.site.de/index.php http://site.de/index.php site.de/index.php to ...
0
votes
0answers
11 views

OpenCart SEO isn't functioning even with SEO Button Enabled and htaccess configured

I have opencart installed with ubuntu 14.04, my apache config file is: <VirtualHost *:80> ServerAdmin webmaster@localhost ServerName example.com ServerAlias www.example....
2
votes
1answer
1k views

How to block all incoming proxy visits except from one specific I.P?

I have a page that is prone to attacks, so, in order to reduce the anonymous attacks, I use this code in my .htaccess which I found online : # BLOCK PROXY VISITS <IfModule mod_rewrite.c> ...
0
votes
1answer
37 views

Switch back from Cloudflare SSL - 301 Back to http?

I need to know how put a 301 Redirect in my htaccess which points https back to http. Can you help? I see plenty of posts for going from http to https, but not in reverse! I am switching back from ...
0
votes
1answer
28 views

Is there a way of writing cleaner rewrite rules if you've a large number of redirects to implement

I recentley completed a project whereby I moved a pretty large website to a nice clean smaller website. What this meant was I had to account for a large number of pages that had been indexed by search ...
1
vote
1answer
1k views

.htaccess not being loaded in Ubuntu 14.04 (Apache 2.4.7)

I'm trying to use the .htaccess file in Ubuntu 14.04 (Apache 2.4.7). Here is what my .htaccess looks like # 1 YEAR <FilesMatch "\.(ico|svg|woff|eot|ttf)$"> Header set Cache-Control "max-age=...
0
votes
1answer
21 views

What is the correct way of forcing https as well as redirecting just the root of the site to another https address

Here is my .htaccess file so far, server is running apache2.4. RewriteEngine on RewriteCond %{HTTP_HOST} example1\.org [NC] RewriteCond %{REQUEST_URI} ^/$ Rewriterule ^(.*)$ https://example2.org/ [L,...
-1
votes
1answer
36 views

Redirect old domain to new domain with full path

I've very little knowledge in this area - hence the question... I'm looking to do the following: I currently have a server with a number of websites listed in sites-available and sites-enabled. There ...
0
votes
3answers
253 views

Check if file exists in subdirectory and otherwise redirect everything to main controller

What I'd like to do with mod_rewrite in a .htaccess file under Apache is the following: If a request for any file or path, e.g. foo.txt or foo/bar, is received, check if such file exists in the ...
1
vote
1answer
32 views

Rewrite URL but have php read old URL

In my platform, each user has their own config file. The file is named by the subdomain they created. Example: user1.domain.com user2.domain.com user3.domain.com The system reads the url via $...
0
votes
0answers
11 views

.htaccess request_uri mismatch when at certain url

I use .htaccess to redirect unauthorized user when they visit a certain path, say www.domain.com/member/ In my rewrite rule, I have RewriteCond %{REQUEST_URI} !=/member/index.php which works ...
0
votes
0answers
23 views

http redirects to https unless one page

I have this in my htaccess file, to redirect all http to https: RewriteEngine On RewriteBase / RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://www.sientemarruecos.viajes/$1 [R=301,L]...
0
votes
0answers
15 views

Move 2 subdomains without breaking links to themselves

Assume www.example.com contains two sub-domains, each with a different site, such that www.example.com/sub1 and www.example.com/sub2 are not related to each other. I want to move/rename sub1, but I ...
0
votes
1answer
26 views

What's the error in my HTACCESS

index page and profile page show 404 after htaccess redirection I transfered from bogger to wp.. redirected all links from year/month/postname.html to postname/ using these lines: # WPhtc: Begin ...
0
votes
0answers
39 views

phpMyAdmin asks for BasicAuth

When accessing the phpMyAdmin link (mydomain.com/phpMyAdmin/), I am being prompted with a BasicAuth pop-up. The phpMyAdmin/config.inc.php does not overwrite any defaults, therefore the config.default....
0
votes
0answers
25 views

How to restrict access to docroot folder of glassfish server

Inside the docroot of the glassfishserver I have created a .htaccess file: AuthType Basic AuthName "aaa" AuthUserFile "C:\Users\user01\Desktop\.htpasswd" Require valid-user And on the desktop I ...
0
votes
1answer
242 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
9 views

How to redirect everything to https with www? [duplicate]

I am using the following code in my .htaccess file RewriteCond %{HTTP_HOST} ^[^.]+\.[^.]+$ RewriteCond %{HTTPS}s ^on(s)| RewriteRule ^(.*)$ https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301] It ...
0
votes
2answers
697 views

Apache 2 .htaccess matching all sub directories of current directory

I want to disable the php engine in all directories below the current one. I have tried using <Directory> and <DirectoryMatch> but cannot find the correct regex syntax for matching just ...
0
votes
2answers
102 views

apache2.conf write global redirect for all sites hosted on server

I have been trying to add rules like the following to the /etc/apache2/apache.conf file but they havent been noticed, whereas if I add them to the individual .htaccess files they are obeyed and anyone ...
12
votes
4answers
1k views

Load time impact of htaccess

There are in general two possibilities of handling stuff on Apache: make configurations for folders one by one using htaccess file to fully resign htaccess and put all the rules into the httpd.conf ...