Tagged Questions

The htaccess file is a supplemental configuration file used by Apache to modify the default configuration as it applies to the directory the .htaccess file it in (as well as all the files in that directory). The most common use is in conjunction with the mod_rewrite and security modules of the ...

learn more… | top users | synonyms (1)

0
votes
1answer
31 views

I want to restrict access to apache folder via IP - is this possible?

I'm using this simple .htaccess file in a media uploads folder to allow the customer to see what's been uploaded. Options +Indexes IndexOptions +FancyIndexing Is it possible to add a directive to ...
1
vote
1answer
19 views

How to set up .httaccess to subfolder

I have these structure on my FTP: one presentation (without .htaccess) second presentation (with .htaccess) - named "sec_pres" third pres. (with .htaccess) - named - "third_pres" How I should ...
1
vote
2answers
45 views

.htaccess setup configuration

Here is my compiled .htaccess for security. do you see anything wrong with it that needs to be corrected? is there anything here that might mess up a legit website? did I cover all the basics? ...
0
votes
1answer
29 views

Root domain redirect, otherwise A record redirect

I would like to redirect every incoming request via A record to another server (url-shortening service) unless the root is requested.... Is this possible? If so, how? If not, why not? A simple ...
1
vote
1answer
28 views

How do I avoid URL redirect when using SSLRequireSSL + ErrorDocument

Ok, so I have an Apache host I'm working on (shared host) who has this in their root .htaccess file.: Options -Indexes SSLOptions +StrictRequire ErrorDocument 401 "<!DOCTYPE html><html ...
2
votes
1answer
55 views

.htaccess redirect works for IP, but not for domain name

I have the following .htaccess file: RewriteEngine on RewriteBase / RewriteRule ^(/?)dir/?$ $1dir/subdir [L] RewriteRule ^(/?)subdir2/?$ ...
0
votes
1answer
23 views

Need help regarding htaccess stuff

I have my site at www.example.com and have several sub-domains city wise. Suppose i have subdomain with name say "subdomain.example.com" then i want to redirect the subdomain homepage to directory in ...
0
votes
1answer
22 views

htaccess url rewriting for 1 folder

My .htaccess file works fine for everything expect 1 specific folder. As result, http://www.mydomain.com/administration/index.php unexpectedly goes to 401 error page instead of loading index.php from ...
0
votes
0answers
17 views

Why is Apache2 Worker throwing 500 errors on deny from <IP>?

I just switched from Apache2 prefork to worker and some strange problems with .htaccess, one of which is that suddenly all of my deny from <ip> directives in .htaccess, which I use to block ...
1
vote
1answer
26 views

.htaccess rewrite: How to add exception for specific files?

I need to add an exception for a specific file in my .htaccess. I've tried to add this line: RewriteRule ^/print.php$ - [L], but it has no effect. Can anybody figure out why? The whole file looks ...
0
votes
1answer
35 views

How can I block HTTP while allowing FTP using htaccess under Apache?

I can easily block requests to a directory using a .htaccess file with "deny from all". However, I allow want to allow FTP access via clients and browsers alike. Is there a way I can restrict the ...
1
vote
1answer
70 views

Failed PCI compliance - 403 (Forbidden)

Due to a recent upgrade in the scanning done by our PCI compliance testers, we recently failed a PCI, and the suggested solution is as follows: Configure the HTTP server to specify the same error ...
0
votes
2answers
47 views

Turn …/?token=xx-xxx into …/xx-xxx

I have a htaccess-file that removes index.php (codeigniter). I am having a problem with Paypal, cause the return url is using query strings, which are troublesome in codeigniter. This is my ...
0
votes
1answer
17 views

Redirect a url to a new host

I have the following URL which displays a normal static website: www.example.com. This site is hoted on Amazon. I want to make all urls starting with www.example.com/redirect to redirect to another ...
0
votes
0answers
24 views

Subdomain to Domain with original URL kept

I want to redirect a subdomain to a domain but keep the original subdomain URL. The way my host works, is that /sub/subdomain/ is the standard subdomain root. Each subdomain has its own htaccess ...
0
votes
2answers
28 views

Securing a directory using htaccess but with different levels of access

I am trying to secure a directory by IP address. I need to access the directory from my ip address (through the browser) and no one else. But I also need to access it via cron (cli). I also have ...
1
vote
1answer
36 views

Convert nginx to Apache rewrites

I'm trying to set up CodeIgniter from an existing site that's on nginx. My local machine is Apache and this is the redirect scheme on nginx. How do I write this using RewriteRules? if ($host ~* ...
0
votes
1answer
31 views

.htaccess clean URL production, css appears to have not been applied

This is my first attemp at creating clean URLs using a .htaccess file. My page is a simple, php generated page. My page is http://www.dimiourgiasite.gr On the top left corner of the page I have a ...
0
votes
2answers
47 views

Cant get RewriteCond rule to work in mod_rewrite

I have the following path: http://www.domain.com/cgi-bin/hsrun.exe/Distributed/Postphil/postphil.htx;start=DetectLanguage?Language=LANG_Icelandic If the path contains the folder /postphil I want to ...
0
votes
1answer
35 views

.htaccess file location

I am trying to use an .htaccess file to create clan URL for my website. I want to test it on my local version of the site and the upload to the server if I succeed. The question is, where do I have ...
0
votes
2answers
100 views

How to redirect from one port to another?

I've a domain on which I'm running two different web applications at different ports. A Java web application on example:8888/foo A PHP website on example:8080/bar The requirement is, if an user ...
0
votes
1answer
52 views

WP Simple Download Monitor File Download URL Redirect issues

In .htaccess file: <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{QUERY_STRING} =sdmon=software_download/software1.exe RewriteRule ^index.php$ http://download.domain.com/software1.exe? ...
1
vote
1answer
38 views

htaccess redirect issue

I have the following on my .htaccess file within /var/www/html folder. Options +FollowSymlinks RewriteEngine on RewriteCond %{HTTP_HOST} ^(www\.)?domain\.net [nc,or] RewriteCond %{HTTP_HOST} ...
0
votes
1answer
70 views

.htaccess not working but is enabled

I have a .htaccess file that isn't working. I know it's not working because i wrote random things in it and i am not getting a 500 error. Even when i write proper code it doesn't work. I have ...
0
votes
2answers
119 views

Virtual hosts on apache to point domain.com, domain.net, domain.org to all go to domain.com

All of the names currently point to the same web server folder which is correct. That is, the domain.net, domain.org, etc all work without redirecting to the main .com How do I get visits to the .org ...
0
votes
1answer
168 views

Why does this pattern not match QUERY_STRING in RewriteCond while it matches in preg_match?

Here is what I have in my .htaccess file. RewriteEngine on RewriteCond %{QUERY_STRING} ^(run=[a-z0-9A-z]{13})$ RewriteRule %{QUERY_STRING} \? [L] All I am doing is Rewriting the QUERY_STRING for ...
2
votes
1answer
52 views

Why is the RewriteBase not working?

Here is what I am trying to do: domain is thinkingmonkey.me domain has 127.0.0.1 as IP addr mod_alias is installed. I have a conf file called directories.conf. In which I have all the ...
0
votes
1answer
49 views

You don't have permission to access / on this server. Apache, win 7

read all the posts regarding this issue - and none of them seed to help my instance... I just moved all my dev stuff form a vista machine (where it worked fine) to a Windows 7 machine - Apache 2.2... ...
0
votes
2answers
37 views

mod_rewrite `Redirect` how?

I have 2 urls say thinkingmonkey.me and thinkingmonkey.com both have ip-address 127.0.0.1 (A.K.A localhost). I want to redirect any requests to thinkingmonkey.com to thinkingmonkey.me. ...
0
votes
2answers
139 views

Should I use .htaccess in an Apache production/live environment?

Is there any reason (security, performance, etc.) that I should not use .htaccess in an Apache production/live environment?
1
vote
1answer
18 views

Creating a .htaccess on windows in ultraedit not working in linux

I created a simple .htaccess on windows using ultraedit, but after I uploaded to the linux apache server, it won't work, always gave me 500 error. I used linux command line to cat it, it shows that ...
0
votes
1answer
65 views

IPv6 only subdomain

I have a domain and shared hosting at godaddy. I've created a subdomain and added an ipv6 proxy from sixy.ch in my aaaa records. Nov I have IPv4 a v6 connectivity too, but i want to block access from ...
0
votes
2answers
30 views

.htaccess - php_value with url match

Apache doesn't let .htaccess use frills such as Location, Directory - without these, is it possible to match a url pattern and set php configuration settings (via php_value) in a .htaccess file?
1
vote
1answer
47 views

.htaccess Redirect causes Internal Server Error

.htaccess Redirect /index2.html http://example.com/index.html causes the following error Internal Server Error The server encountered an internal error or misconfiguration and was unable to ...
0
votes
0answers
41 views

subdomain to subdomain forward with masking

I want to forward with mask from one server to another server. In Server One: www.abc.com test.abc.com live.abc.com In Server Two: http://ipaddress/folder1 http://ipaddress/folder2 ...
3
votes
1answer
63 views

Why isn't htaccess following this php_value directive?

In .htaccess I've added php_value session.name "SID" This seems to have no effect, however, and no errors are thrown in error_log. Other rewrite rules in the same .htaccess file are working as ...
0
votes
1answer
70 views

(Probably) Simple mod_rewrite - remapping my site's URLs

This problem is driving me nuts. I've tried reading loads of tutorials about how to use mod_rewrite but I just can't get my head around it. These questions must get asked all the time, so apologies ...
1
vote
2answers
31 views

.htaccess and redirection - anything but this list redirect

How do I say in an .htaccess file that I want to take anything that doesn't match: main.php index.php /images/* /css/* and redirect it at the / of the current website?
0
votes
2answers
106 views

How to remove .htaccess virus [closed]

Possible Duplicate: My server's been hacked EMERGENCY All Subdomain folder with root folder they write a .htaccess file with this code <IfModule mod_rewrite.c> ...
1
vote
1answer
76 views

Malicious script changing .htaccess files on server [closed]

Possible Duplicate: My server's been hacked EMERGENCY There seems to be a malicious script accessing my server and editing the .htaccess files for all of my hosted sites to redirect ...
0
votes
1answer
19 views

Mod_rewrite excluding files/directories but including .php files

The traditional mod_rewrite for routing is as follows: RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php [L] ...
0
votes
2answers
100 views

Apache Virtual Host with Alias

I have a virtual host running on my local copy of Apache. It has an alias. <VirtualHost 127.0.0.1> ServerName oliverash.me.dev DocumentRoot "/usr/docs/oliverash.me/public" ...
0
votes
0answers
40 views

Rewrite this .htaccess line to web.config?

I am still new to web.configs, so I have searched the web for a rule in web.config similar to this line in .htaccess RewriteCond %{HTTP_USER_AGENT} libwww [NC,OR] RewriteCond %{QUERY_STRING} ...
5
votes
1answer
93 views

.htaccess rewrite http to https results in loop

On an apache 2.2 server running varnish, I am trying to redirect http -> to https for an entire Drupal Commons (http://commons.acquia.com/) site. Since varnish caches some redirects (R=301, but not ...
0
votes
1answer
39 views

WordPress multi site .htaccess does not work with ip address and tilde URL

I have to move a WordPress multisite from one server to another. I duplicated all my files and the db and now I would like to test it by browsing a few of the installed blogs. Unfortunately I can't ...
0
votes
1answer
152 views

.htaccess file being compromised

I have a website hosted with Dreamhost and the contents of my .htaccess file are being compromised over and over again. someone is putting stuff like this in the front of my code: RewriteCond ...
0
votes
1answer
108 views

How to create .htaccess and block UserAgent libwww-perl?

I have been testing my website with a SEO checkup tool and one of the warnings I got was this: Your server appears to allow access from User-agent Libwww-perl. Botnet scripts that automatically ...
0
votes
4answers
80 views

can't access the site without WWW in the url [closed]

Possible Duplicate: Enable access without “www.” on Ubuntu I just got set-up my first website and bought my own first domain name , but problem has showed up. I noticed that i ...
0
votes
1answer
37 views

htaccess rewrite rule

Well i have this code into my .htaccess file Options +FollowSymlinks RewriteEngine on AddDefaultCharset UTF-8 RewriteCond %{THE_REQUEST} ^[A-Z]+\ (.+)\.php [NC] RewriteCond ...
1
vote
0answers
34 views

htaccess rewriterule [closed]

Possible Duplicate: htaccess rewrite rule Well i have this code into my .htaccess file Options +FollowSymlinks RewriteEngine on AddDefaultCharset UTF-8 RewriteCond ...

1 2 3 4 5 19