.htaccess

Can't run a Perl app

Although I can run test.cgi from the same location but app.cgi gives "Internal Server Error". I checked the permissions, chmoded 755 to everything. The app is located in domains root so the url will be domain.com/app.cgi This is the htaccess: AddHandler cgi-script .cgi Options +ExecCGI IndexIgnore * DirectoryIndex app.cgi RewriteEn...

Problem with merging wildcard of subdomains with wildcard of few sub-subdomains

Hello! I have EHCP installed because it's simple and helpful on server with few FTP accounts and websites. It's testing only server. Problem is: I can access *.avki.zgarnijlicke.pl, *.kierowca.zgarnijlicke.pl but *.zgarnijlicke.pl isn't working. My config's are: a) Apache template: #______start of {domainname}paneluser:{panelusername}...

Doing a URL Re-Write

Hello, When I click on a comment section for a given entry on a site I have, the URL looks like this: http://www...com/.../comments/index.php?submission=Portugal%20Crushes%20North%20Korea&submissionid=62&url=nytimes.com/2010/06/22/sports/soccer/22portugalgame.html?hpw&countcomments=3&submittor=johnjohn12&submissiond...

Doing a URL re-write while using PHP GET method

Hello, When I click on a comment section for a given entry on a site I have, the URL looks like this: http://www...com/.../comments/index.php?submission=Portugal%20Crushes%20North%20Korea&submissionid=62&url=nytimes.com/2010/06/22/sports/soccer/22portugalgame.html?hpw&countcomments=3&submittor=johnjohn12&submissi...

htaccess correct?

Although I can run test.cgi fine but my perl all doesn't work, is this htaccess correct: AddHandler cgi-script .cgi Options +ExecCGI IndexIgnore * DirectoryIndex myapp.cgi RewriteEngine on RewriteRule ^$ myapp.cgi [L] RewriteRule ^/$ myapp.cgi [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ...

Apache htaccess redirect from /anything to root?

I searched a ton for this, everyone is either directing from root to sub-directory or known /folder to root. Here is what I am trying to do I have hundreds of dynamically created URLs - foo.com/123, foo.com/contact, etc. I'd like to redirect all those URLs (don't know all of them, just know there are a-z or 1-9) to just foo.com. Any...

.htaccess question in association with codeigniter setup.

So I am fairly noobish at .htaccess rewriting. Currently this is my setup for my codeigniter setups: RewriteEngine on RewriteBase / RewriteCond %{REQUEST_FILENAME} !index.php RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [L] This works fine when I am rewriting EVERYTHING to th...

Can I put JS and CSS outside the public folder?

Hi How can I put my JS and CSS files outside the public folder? I have a library that I'd like all my websites to use and for easy updating, have this outside a particular website public folder so it can be easily read by all. Is this possible or do I need to host it all on another domain (I'd rather not for ease). htaccess possibly? ...

Mac mod_rewrite interprets PHP filenames as directories?

I have the following set up working on my live hosting environment (Dreamhost, which I believe is Linux) and also on my Windows environment, but OSX is being tricky. I have the following files in my root directory: resume.php projectName.php What I would like is for projectName.php to map to /portfolio/projectName/. I have the followin...

Appending easy read parameters to urls always require that 'index' be preappended - help

Hi guys I'm using zend framework here and I've enabled url-rewrite so all my urls are clean. The thing is that I've incorporated pagination of results on some pages and I want to append parameters to the url in this form: www.mysite.com/controller/page/2 However I can't do it without appending the default action i.e index to the end ...

Problem with path on using .htaccess

This is the path of folder where are my web documents and which I want to protect: "C:\Program Files\PostgreSQL\EnterpriseDB-ApachePhp/apache/www/MyWeb" Also in this folder I placed: .htaccess and .htpasswd My .htaccess has following: AuthName "Protected site" AuthType Basic AuthUserFile C:\Program Files\PostgreSQL\EnterpriseDB-ApacheP...

Multiple htaccess files in one folder, or conditional AuthType Basic?

I am using the same .htaccess file on my local, and live servers, and want to use the same file on my test server (to made code management easier). Currently though I have to have a different file, because my test server has htaccess password access on it, AuthType Basic. Is there a way to either have 2 .htaccess files in the same fold...

URL rewriting from root to parent directory

Hi, I need to write a rule to redirect a page to a parent directory in a .htacces file. For instance, this is my files system : - a-directory - another-directory -- a-file i've got a virtualhost which is a pointer to "a-directory" so when i go to http//my-virtualhost/a-file, i need to go back to the parent directory and open "a-fil...

.htaccess routing

I want to create my own routing system with .htaccess, but I have some problems. My folder structure is: .htaccess |- system |- controller |- theme | -- domain.dk | --- gfx | --- style | --- html How can I make my .htaccess right? Using routing too? My .htaccess looks like this: RewriteEngine On php_value zlib.out...

Help on rule on .htaccess

I have made an .htaccess to my root directory for creating a subdomain level, assume it is sub.domain.ex that redirect to domain.ex/deb/ RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} sub.domain.ex RewriteCond %{REQUEST_URI} !deb/ RewriteRule ^(.*)$ /deb/$1 [L] and this works well. Now, I go to /deb/ and create another .htac...

htaccess : make directories exceptions from auto_prepend?

Is there a way to make my auto_prepend command ignore my includes/ and ajax/ directories? I can write regular expressions easily it's just knowing how to markup the conditional statements... # choose which files are mother files (aka not includes or ajax) # add dochead to these files {some kind of regex conditioon here } php_value auto...

Rewrite in htaccess on Wordpress

Hey All, I made the mistake of creating a site in a folder on a test domain and now I want to redirect any traffic to that URL to the new one. For instance I have: http://subdomain.example.com/blog and I want it to go to a complete new domain. Any help is appreciated. Thanks, Matt ...

need .htaccess rewrite rule for hot linking images

I have a site that is hotlinking images, please help <img src="http://mattdunlap.org/?ak_action=api_record_view&amp;id=1060&amp;type=feed" alt=""> Since it is not an image (jpg|png|gif), my hotlinking script is not working I've tried this but doesn't work RewriteCond %{HTTP_REFERER} !^http://(www\.)?cheaps1.info/.*$ [NC] Rewrite...

htaccess NOT pattern

Hi, I have some links problem and I'm trying to solve the problem using htaccess. I have a directory that contain images, for example: PGPHX.203.jpg PGPHX.80.jpg PGPHX.137.jpg ... I want that all the links that doesn't contain a *.number.jpg at the end to be pointed to *.203.jpg, for example: FROM: PGPHX.jpg TO: PGPHX.203.jpg 38.108...

Wildcard subdomains using htaccess

Hi all, I'm having some trouble getting the code statement beneath to work as intended. The first part of the code is all good. When a user hits example.com without 'www', he's being 301 redirected to www.example.com to protect the ingoing links. At the same time I'm trying to use subdomains. If a user hits candybar.example.com I want ...