The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
0answers
12 views

Rules added to htaccess don't ever work

I'm trying to add the following code to my htaccess file, but, although the code comes from pages that claim that this is how these things should be done, they either don't work or they break the ...
0
votes
0answers
23 views

How to use .htaccess and .htpasswd for selective redirects & passwords

In my /var/www/ directory I have many directories some like: /var/www/impdata/ /var/www/data/ So can I achieve this: When I go to: www.websitename.com/data/ it should give an 404 error. And when ...
0
votes
1answer
17 views

Show The Same Content For Different URL Strings

I am trying to set up a system where for one of my directories, "example.com/folder/", if a user types in ".../folder/?(RANDOM STRING)", it will display the content for ".../folder/" but keep ...
0
votes
0answers
15 views

303 Redirect in Django WSGI setup

I am running a django application using the WSGI setup. I want to write a redirect to some non existing pages in the app. I tried using .htaccess . But it is not working. Not even a file in ...
2
votes
3answers
92 views

How Do I Block a Host by ASN? Example - AS16276

There are a handful of especially toxic hosts out there. There is no reason we need to allow any of their IP's access to our servers. Is there a way we can block them using their ASN or other global ...
0
votes
0answers
82 views

The requested URL /fr/index.php was not found on this server Htaccess issus

I want to delete query string (fr) from my URI with htaccess rules, so I added this rule in the htacces file : RewriteRule ^((?!fr/).*)$ /fr/$1 [L,NC] But apache gives me this error: The requested ...
0
votes
1answer
140 views

Using .htaccess with IIS

It is necessary for me to make it possible for .htaccess files to be usable with IIS. Is there a way for this to be done? I know that on its own, IIS is not capable of handling this, but could I ...
0
votes
0answers
11 views

CentOS 6 apache2 vHosts Weird 403 error

So wheneve I try to access mydomain.com:1593 I get a 403. Heres the end of my httpd.conf Listen 80 Listen 1593 NameVirtualHost *:80 NameVirtualHost *:1593 <VirtualHost *:1593> ...
0
votes
0answers
54 views

how to solve apache settings for double slash on sub-directory of a wordpress

i have multiple websites on a single domain, there's one website on the main domain and two of them on sub-directories and they're using wordpress. as this is not a problem with wordpress or its ...
0
votes
0answers
42 views

Why doesn't Apache Server allow Order command in .htaccess?

I'm running Apache v2.4 on Windows 7 and when I try to insert Order or Options into my .htaccess file, the server gets errors like these: Invalid command 'order', perhaps misspelled or defined by ...
0
votes
0answers
98 views

Apache mod rewrite testing tool (no online tools)

I've tested some great RegEx standalone tools and found a couple of mod rewrite online tools, but is there some standalone tools for testing apache mod rewrite definitions? Ideally, I want something ...
1
vote
2answers
93 views

htaccess redirect to port

I need to redirect subdomain.example.com -> subdomain.example.com:32400/web My current htaccess is: Options -MultiViews +FollowSymLinks RewriteEngine On RewriteCond %{HTTP_HOST} ...
0
votes
0answers
40 views

What is wrong with my .htaccess 404 error

I have created .htaccess under my public_html folder and it is like this: ErrorDocument 404 /404.php if I type mydomain.com/random it shows the 404 error, however if I add anything else, like ...
0
votes
0answers
7 views

Is there a way to check whether Apache AllowOverrice Options is allowed in .htaccess?

I have following .htaccess file: Options -Indexes Options -MultiViews This file is deployed into many servers with different configurations. Some of them has AllowOverride Options disabled and ...
0
votes
1answer
78 views

htaccess password dialog shown on home route

I created a droplet that has Wordpress installed on Digital Ocean. When I visit the homepage "/", I am required to input the .htaccess credentials in a dialog that shows up. I noticed this statement ...
0
votes
0answers
75 views

Route to the proper file with .htaccess

I'm having issues with my Codeigniter .htaccess file... basically it goes like this. Regular .htaccess file (that works on my localhost): RewriteEngine On RewriteCond $1 ...
1
vote
1answer
108 views

webserver serve file request with delay (htaccess)

I'm trying to figure out if it is possible to configure a webserver so that requests for files will be served with a delay. So for example if i were to serve this file ...
0
votes
0answers
22 views

One domain, two servers

I have an architecture where some sub folders of a domain needs to redirect to another with their POST data, like so: domain.com => Server #1 domain.com/someSubDir => #server2 ...
2
votes
0answers
45 views

Keeping Firefox from adding “.html” to url

I've been messing with .htaccess for a while, and have the following rule: RewriteRule ^(mypage|myotherpage)/?$ main.php?p=$1 [L,QSA] If I enter http://mydomain.com/mypage/, it displays main.php as ...
0
votes
1answer
137 views

Add a Trailing Slash to Single Url

Hi I Want to Add Trailing Slash to (/) only a Single URL The URL I want to add trailing slash is http://niresh12495.com/index.php so it would look like http://niresh12495.com/index.php/ any htaccess ...
0
votes
1answer
543 views

rewrite url in address bar without changing the actual url

Im facing SEO problem with my website cause my urls are with index.php for an example when i try to upload a file the url is like this 1 -http://niresh12495.com/index.php?app=downloads and when i ...
0
votes
1answer
541 views

remove the question mark from url using htaccess

i have tried to remove the index.php from url but the problem is I'm seeing an ugly question mark in the beginning of the url how can i get rid of it This is the code i have used in htaccess ...
2
votes
1answer
380 views

.htaccess Allow access not file by link only

I know that is possible to limit the access to a directory by the allow from ip.ip.ip.ip directive. But I've got a slightly(?) different problem: There is a directory, that contains pdf files only. I ...
1
vote
1answer
885 views

how to redirect a url with port via htaccess

Im Trying to Redirect a Single url like http://tracker.niresh.co:12495/announce to http://tracker.niresh.co/announce.php How can i get it working through htaccess ?
1
vote
2answers
67 views

Unhide all .htaccess files on mac

I am trying to unhide all the .htaccess files in my home folder. Below I've pasted what I'm using now, but it isn't working. find ~/ -iname ".htaccess" | xargs chflags nohidden "{}" Anyone knows ...
3
votes
0answers
158 views

why Safari always GET status 200, never 304 for my .swf file?

I serve a Flash app as a .swf file (with HTML wrapper file), and Safari always retrieves with GET status = 200, never 304. Thus, Safari never uses cache for this file and downloads it each time (it's ...
0
votes
3answers
4k views

MAMP .htaccess file not working

I'm looking for a while now how to enable .htaccess files in MAMP 2.1.2 I have the following settings: httpd.conf LoadModule rewrite_module modules/mod_rewrite.so ... # # DocumentRoot: The ...
0
votes
1answer
94 views

Redirect with .htacess - URL with regex to URL

I have a temporary need to redirect some installer files on my web site. The redirects that are working now look something like this: Redirect 302 /installer_1.0.0.zip ...
1
vote
2answers
603 views

.htaccess not working with SVN

I've got SVN setup on my home server, I'm trying to get htaccess working so I can password protect the /var/www/html/svn/repos folder where all my code is kept. The subversion.conf file looks like ...
1
vote
1answer
118 views

How to send an alert when a user logs in via .htaccess?

We have vendors working remotely on our server and would like to know when they are accessing the development. It is accessible behind a username/password provided by .htaccess. How could I detect ...
0
votes
1answer
103 views

How to choose php version in .htaccess

I would like to install my PHP web application on a service that has two PHP versions, 4 and 5. I need PHP5, and I don't have access to httpd.conf due to server restrictions. How can I tell the Apache ...
-1
votes
1answer
67 views

Restrict page access only to servers

I am running a cron job to excecute a file that should be accessed only by the server not others.my website is hosted by webhosting company and I have access to cpanel.. What should be done? I ...
0
votes
1answer
61 views

mod_deflate - possible to compress 1k or higher only? cache?

Is there a way to tell mod_deflate in .htaccess to only compress files if they are at least 1kb? Also, can it cache compression results? Once it compresses a file, I want it to use that again instead ...
1
vote
0answers
188 views

mod-rewrite rule not working properly for files in sub directories

I'm using the following rewrite url to get prettier urls: RewriteRule (\d+)/(.+) $2?companyId=$1 [NC,L,B,QSA,NE] The url /invoices.php?companyId=123 can for example be expressed as ...
0
votes
2answers
797 views

HTACCESS - Server 404 for “deny from” instead of 403

Is there a way to server 404 instead of 403 when matched with "deny from"? For example: <Files *> order deny,allow deny from 127.0.0.1 </Files> This will normally server a 403. But I ...
1
vote
0answers
17 views

HTACCESS / ErrorDocument - How to serve 410 instead of 403 [duplicate]

Can anyone please tell me how to server 410 instead of 403 (without serving any html page in 403)? Like instead of: ErrorDocument 403 /403.html we need something like this: ErrorDocument ...
0
votes
1answer
358 views

.htaccess and .htpasswd throwing 500 internal server error

I've created a .htaccess and a .htpasswd file, both using my hosting's tool, uploaded them, and I get an error when I try to view the directory. Why? my .htaccess file: AuthName "Restricted Area" ...
0
votes
1answer
339 views

Enable .htaccess on ubuntu server

I am looking to enable .htaccess in my Ubuntu server, I have ssh access and have attempted: sudo nano /etc/apache2/sites-available/default and changing AllowOverride from none to all under directory ...
1
vote
2answers
26 views

Forwarding of root URL only?

I have a domain and I would like and visits to the root of the domain only to be forwarded. For example: www.domain.com -> www.domain.com/holding However www.domain.com/home ...
0
votes
1answer
52 views

Allow other instances of files that is globally blocked in htaccess?

I am using the following command inside home/ to block all access to wp_login.php <Files wp-login.php> order deny,allow deny from all </Files> How can I allow certain instances of ...
1
vote
2answers
36 views

Apache rewrite downside?

Say I have my website stored on domain.com/mysite I add a rule in .htaccess to rewrite the URL to domain.com Is there any downside to storing the site in a subfolder and rewriting the URL like this? ...
1
vote
1answer
131 views

How can I prevent dead podcast links on our server being crawled by iTunes

Our work server was previously used to host a popular podcast link. The podcast is removed from iTunes but users are still trying to access the podcast link on our server. The user-agent strings in ...
0
votes
1answer
151 views

Allow access from internal files, but denying access externally

I am trying to figure out how to deny access of a font on a website from external access. This means the user should be denied if they point their browser to the url While still allowing the css ...
0
votes
1answer
84 views

htaccess rename mp3 on the fly

I want all mp3 files residing on my server to have "-xxx" added at the end of the filename when a user downloads them. Example: file on the server: file.mp3 when user downloads: file-xxx.mp3 I've ...
1
vote
1answer
206 views

Redirect invalid paths using .htaccess (e.g. “home.php/xyz”)

I am running Apache 2.4.2 on my local server. My website's .htaccess file is as follows: DirectoryIndex home.php Options -Indexes ErrorDocument 404 /404.php This works great at displaying an HTTP ...
0
votes
1answer
21 views

How can I create a filter defining which invisible files to un-hide?

I want to expose .htaccess is the OSX GUI UI, but not other files that should be "invisible." Any ideas?
0
votes
2answers
375 views

301 redirect with special characters

Trying to do a redirect like: Redirect 301 /blog/tag/blog/alarmforce%20videorelay http://www.mysite.com/blog/tags/tag/alarmforce-videorelay I guess the space is causing the issue. I've tried ...
0
votes
1answer
207 views

Allow access to url with htaccess

I block my entire development site and just provide exclusions for certain IPs. Such as: RewriteCond %{REMOTE_HOST} !123\.34\.12\.123 My IP changes all the time and I have DynDNS so I ...
1
vote
0answers
98 views

.htaccess Not Working as Expected [closed]

I have a hosted account not linked to any domain at /~me. In this home directory I have a .htaccess file: Options +FollowSymlinks RewriteEngine on RewriteRule 123.html cgi-bin/example.php [nc] ...
1
vote
1answer
292 views

Multiple .htaccess auth sources

I'm attempting to use LDAP authentication alongside regular .htpasswd authentication, i.e., a user may use a valid LDAP user/pass OR one of the user/passes in .htaccess. The LDAP login is working ...