Directory-level configuration file found mostly on Apache web servers

learn more… | top users | synonyms (1)

-1
votes
0answers
11 views

Why does my URL rewrite rules aren't working? [duplicate]

I have a site with URLs like this: http://www.domain.com/en/product-category/deodorant-x/ And I want to remove "product-category" segment so that end result looks like: http://www.domain.com/...
-1
votes
0answers
17 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 ...
0
votes
0answers
11 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
37 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: ...
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 ...
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 ...
0
votes
0answers
26 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... ...
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 ...
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....
1
vote
2answers
74 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
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 ...
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> ...
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 [...
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....
0
votes
1answer
38 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
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,...
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
votes
1answer
37 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 ...
1
vote
1answer
33 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
3answers
254 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 ...
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
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 ...
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 ...
0
votes
0answers
9 views

I want to rewrite the path with with htaccess [duplicate]

When I visit this link: http://user.demo.net/email@homepage.com/ It will be interpreted as follows: http://user.demo.net/data/email@homepage.com/ I tried this code but it appears the 505 error ...
0
votes
0answers
35 views

Apache htaccess rule to obfuscate a directory name?

How can I hide the true name of a directory using a .htaccess file and only allow access to it under a different path? Yes, this can be achieved by renaming the admin directory to something else, ...
0
votes
1answer
28 views

Apache Aliased Directory doesn't work for child directories of alias

I'm trying to run two different applications under user. Application 1: /home/user/public_html/app/public/ Application 2: /home/user/public_html/forum/ VirtualHost has the Server set to ...
-1
votes
1answer
93 views

How to Permanently redirect URLs based on conditions

everyone I will be very much grateful if anyone can help me with the correct .htaccess rules to permanently redirect all URLs that meet the criteria == domain.com/category/subcategory/123456-some-...
0
votes
2answers
47 views

Apache says it can't read htaccess file when accessing files under specific folder

For other folders, my .htaccess file works fine, but when I was trying to download files under files folder, I got an error saying You don't have permission to access /files/ on this server. Server ...
0
votes
0answers
10 views

htaccess on subdomain & query string

I have the following htaccess RewriteEngine On RewriteCond %{HTTP_HOST} !^www\. RewriteCond %{HTTP_HOST} ^(.*).domain\.com RewriteRule ^(.*)$ index-merchant.php?id=%1 [NC,QSA] It can capture $_GET['...
1
vote
0answers
39 views

redirect subdomain of old domain to directory in new domain

I would like to redirect a subdomain of an old domain to a directory on a new domain. e.g. forum.old-domain.com should redirect to new-domain.com/forum The redirection from old-domain.com to www.new-...
0
votes
1answer
13 views

Can't view domain.com/stats page with Joomla .htaccess enabled

I always have to disable my .htaccess to be able to see my stats page located unrder my domain in /stats . What can I do to tell htaccess to ignore routing /stats? ## # @package Joomla # @...
1
vote
2answers
96 views

How have phpMyAdmin (with a Alias) with a virtual host subdomain of a different documentRoot

To increase security in my server I created an subdomain only for admin, like admin.domain.tld and usually i access phpmyadmin by going only at admin.domain.tld/mysqladmin as in config file: <...
2
votes
0answers
9 views

Move htaccess rules to apache configuration files

I'm running a website with Joomla on a dedicated server (Debian), and i've read that moving .htaccess rules to apache2 configuration files may result in a good performance improvement (Apache HTTP ...
0
votes
1answer
76 views

Apache access control — from allow/deny to require

I'm trying to move my Apache access control directives from the older Order, Allow, and Deny to the newer Require. Unfortunately, I'm unable to think a new way after having used the old way for so ...
0
votes
0answers
22 views

How to make a 301 Redirect before proxy?

I have apache in front of tomcat. I have this proxy settings: <IfModule mod_proxy.c> <Proxy *> Allow from 127.0.0.1 </Proxy> ProxyPreserveHost On ProxyPassMatch ^/(.+\.cf[cm])(/.*)?$...
0
votes
0answers
20 views

How HTACCESS redirect using URL id content number range

I want redirect on range id content to a subdomain. For example: From id = 1 to 500 i want redirect to a subdomain oldcontent.example.com From id = 501 to 1000 i want redirect to a subdomain ...
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 ...
0
votes
2answers
50 views

How to disable the automatic redirection in WordPress-htaccess-file

WordPress has a function in its htaccess-file which performs an automatic redirection if the filenames match with an existing source. For example if you type in http://rechnen-in-der-wolke.net/...
0
votes
0answers
9 views

Apache not following RewriteRule for a symlinked dir

If I have a bad symlink as such: $ mkdir newmedia $ ln -s newmedia media $ rmdir newmedia So now media\ is a broken link My .htaccess has RewriteRule '^media.*$' https://www.google.com [R=301,L] ...
-1
votes
1answer
25 views

Override Apache method access settings

My website located at hosting server with Apache2/PHP5. When I published my site i found that on some server returns 403 Forbidden. I found that this error appears on request with method PUT and ...