Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
Make your voice heard. Take the 2019 Developer Survey now

Questions tagged [htaccess]

The hypertext access web server configuration file used for overriding configuration on a per-directory basis.

1
vote
1answer
5k views

How to configure XAMPP to list all files and directories, including index files?

I want to configure XAMPP to show all files and folders in a given directory, even index files. But when I browse to the directory, index.php is run automatically instead. What settings can I use in ...
1
vote
1answer
1k views

CentOS 5, cannot accept htaccess

I have problem with htaccess on my vps.I installed CentOS 5, uploaded site on /var/www/html and it works.But, htaccess isn't working.I tried to add AllowOverride All in httpd.conf, also uncomment ...
0
votes
1answer
246 views

.htaccess speed vs. symlink or DNS setting I don't know about?

This is probably a very simple question, but there's so much content out there that it was hard to google the correct problem I have. I have 3 domains that I all want to go the very same place, ...
0
votes
1answer
1k views

ftp server connection timed out

I've forwarded a domain from the htaccess file some time ago. For example, I have www.mywebsite.com and I've forwarded it to www.facebook.com from the htaccess file. Now when I try to connect with ...
1
vote
1answer
1k views

How to move from MAMP to native Apache on Mac OS 10.7

I just upgraded my development computer to Mac OS 10.7.3 (Lion) from Mac OS 10.5.8 (Leopard), which required a complete disk erasure. For several years I've used MAMP to run a development server on ...
2
votes
1answer
6k views

htaccess how to redirect if all other rules fail?

htaccess has always given my problems. Every time I think I understand it, htaccess goes against what I just thought I understood. Any help would be GREATLY appreciated. What I want to do with ...
1
vote
1answer
2k views

allow public access to subfolder of protected folder on apache

I have password-protected the root folder of my website while i do maintenance, but I want to display a custom 401 error page to let people know the site is under construction. Unfortunately, my web ...
0
votes
0answers
148 views

Trouble handling zip files?

I'm trying to send a zip file to someone, but I'm having a lot more trouble with it than I should. I tried uploading it to 4shared, mediafire, and megaupload, but all uploads failed multiple times. I'...
1
vote
1answer
219 views

.htaccess in subdir gets ignored by Wordpress' own .htaccess in /

I have a Wordpress installation on the root of an apache (I.E. on /) and WP wrote this custom .htaccess: <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] ...
0
votes
2answers
807 views

.htaccess file ignored on Ubuntu server

I'm having a problem with an .htaccess file on a newly installed Ubuntu server running Apache2. The .htaccess file in the directory where the WordPress files are located isn't being take into account ...
0
votes
1answer
67 views

Allow Verified Users Only To View Directories

I want to upload some websites I have worked on to an Apache server. What I would like to do though is to use an .htaccess file or something similar to redirect the user to a login page if they go ...
1
vote
1answer
3k views

.htaccess not working

I am trying to get .htaccess to work under Apache, but the server doesn't seem to honor it. In httpd.conf I have: AllowOverride All I have restarted the server with service httpd restart. I have ...
1
vote
0answers
2k views

403 Forbidden Acces via .htaccess clean url but can be accessed directly

Could someone help me decode my apache2 error_log? [Sat Nov 19 17:39:59 2011] [error] [client ::1] client denied by server configuration: /Library/WebServer/Documents/Users [Sat Nov 19 17:39:59 2011] ...
0
votes
1answer
1k views

Why is redirecting inside the nginx config file inefficient?

Can someone explain why they say this in the nginx documentation? Why is it "cumbersome and ineffective"? A redirect to a main site People who during their shared hosting life used to ...
3
votes
2answers
3k views

How to hide the PHP file extension using WampServer and .htacess file?

I just installed WampServer on Windows7 and uncommented mod_rewrite and set AllowOverride to All in the httpd.config file. I created an .htacess file and placed it in the root folder with the ...
1
vote
2answers
155 views

Is .htaccess necessary for Apache httpd?

I'm now setting up a weblog site and encountered this problem. My server is Apache httpd 2.2. In case my weblog pollutes the root directory(htdocs), I created a subdirectory blog. The current state ...
0
votes
1answer
269 views

Understanding this generated .htaccess file and solving my problem_

I've downloaded and installed some software on a web server which seems to have generated an .htaccess file in my root folder. I didn't care at first, until I realized I wasn't able to navigate to ...
4
votes
1answer
8k views

configuring cgi-bin using .htaccess

I'm trying to configure a directory as cgi-bin using .htaccess, but when I try to access the executables, the files are downloaded. I'm using apache2.2. What is the problem? My .htaccess looks like: ...
1
vote
2answers
1k views

How secure is .htaccess?

I've got a personal website I wish to lock down to everyone else except me. I've been using an .htaccess file for a bit and quite like it (they don't even see a webpage, just the login box), but will ...
0
votes
1answer
581 views

problems when computers outside the network connect to my localhost

I'm trying to let others access the website that I have made. A point of sale system to be exact. Is it really normal for people outside the network to see broken links? I'm using apache as a server. ...
1
vote
0answers
360 views

How Does One Make Apache htaccess 301 Redirects Absolute?

I am trying to redirect my university webpage with an .htaccess file: Redirect 301 /~foo/ http://mynewdomain.com/ However, instead of taking me to http://mynewdomain.com , it appends the ~foo so ...
8
votes
1answer
10k views

pcfg_openfile: unable to check htaccess file, ensure it is readable

After moving a website folder on my local development machine to another drive, then moving it back, I got a 403 error. Most of this problem had probably to do with rights that got messed up. After ...
0
votes
1answer
562 views

Wildcards using .htaccess to redirect to index page

How do I modify the .httaccess to redirect all wild cards to the main domain.
7
votes
1answer
35k views

.htaccess 301 redirect with regular expressions

If I have: redirect 301 /users/foo http://www.example.com/profiles/foo redirect 301 /users/bar http://www.example.com/profiles/bar Can I do something like? redirect 301 ^\/users/(.+)$ http://www....
0
votes
1answer
122 views

How to redirect http://mysite/css/ to http://server1.mysite.com/css?

How can i redirect all requests passed to http://mysite.com/css to http://otherserver.otherserver.com/css ? User typing http://mysite.com/css/somefile.css and go redirect to http://...
0
votes
1answer
291 views

.htaccess to restrict access to only select files

I have a directory in my webserver for which I would like to serve up only pdf files. I found I can restrict access using the .htaccess, and using something like <FilesMatch "\.(text,doc)"> ...
1
vote
3answers
393 views

Is it possible to rsync your web site to another backup server and use the same .htaccess files?

I am trying to use rsync to replicate all the files from one web server to another server that could act as a backup if the first one went down. The problem I am having is that the .htaccess file ...
2
votes
3answers
2k views

AllowOverride for userdir

I need to allow all userdir (host.com/~user) to override options in their .htaccess, such as php_value. Where do I configure Apache to AllowOverride ?
1
vote
2answers
4k views

Aptana show .htaccess files

Using the new Aptana Studio 2.0 and loving it. Trying to open and edit .htaccess files in Aptana Studio, but it's not showing up in the PHP Explorer pane, which normally shows all files, but not ....
8
votes
4answers
13k views

How to show .htaccess files in specific folder in the Finder

I need to see my .htaccess files for the websites i develop locally on my Mac OS X. I put all my sites in the Sites folder. Since it starts with a dot, Mac OS X treats them as system - therefore ...
60
votes
6answers
85k views

How do I rename a file to .htaccess in Windows 7?

I'm using XAMPP to test a PHP script. Now, in the root of the folder I want to place a .htaccess file according to the requirements of the script. But Windows won't let me rename it to .htaccess. Is ...