.htaccess

.htaccess redirect doesn't hide url.

Hi, my .htaccess in the root folder includes the following lines : Options +FollowSymlinks RewriteEngine on RewriteRule ^(.*)\.htm$ http://example.com/?city=$1 [NC] when I open the address http://example.com/bla.htm, my browser doesn't hide the GET values specified in the .htaccess, it redirects me to ?city=bla. eventhough I'm not u...

.htaccess redirect for blackberry not working

I am trying to redirect blackberry users to my mobile site by doing: # redirect for blackberry users RewriteCond %{HTTP_USER_AGENT} ^.BlackBerry.$ RewriteRule ^(.*)$ http://www.domain.com/m/ [R=301] in my .htaccess, but nothing happens when I try to access from the device, I've already deleted cache and cookis and nothing works. I hav...

how to use .htaccess to silently read from the cache, if the file exists? is this possible?

Hi, i have this file structure: / /index.php /test.php /example/foo/bar/test.php /cache/index.htm /cache/test.htm /cache/foo/bar/test.htm everything in /cache/* is a flat file (.htm) of the generated php files. Basically what i want to do is this - a user requests /index.htm (users will never see a .php in their url even if its ...

zend framework deployment in server

I have a server, where I have uploaded my work in zend framework(in a subdomain). the folder name is 'visit'. So, When I go to: http://mysitename.com/visit, it shows a directory structure: Parent Directory application/ docs/ library/ nbproject/ public/ tests/ But when I go to: http://mysitename.com/visit/public, i get the index page ...

Read/write only for scripts

Seems it is a question about .htaccess, not sure what should I use. How can I make files inside /data/ folder available to read and write only for scripts? Users should not have access to them from browser window. ...

forwarding every request(other than specified) to same php file

Hello, I am trying to route every request(with params) to file home.php without changing the URL other than few we would like to go as normal i.e. /user.php?a=new should forward to /home.php?a=new but browser url still should show /user.php?a=new /profiles/user.php?a=delete should point to /home.php?a=delete and url should stay same ...

Redirect cgi-bin directory

My Old site had a lot of urls using the cgi-bin directory eg : www.website.com/cgi-bin/etc?123 Now the site is now on a new server running wordpress, and I want to redirect this to : www.website.com/etc/123 The problem is I am getting 404 errors that are not being processed by wordpress, and even creating a direcotry cgi-bin does the s...

mod-rewrite redirect parent URL to sibling URL

I've read over the similar questions on stackoverflow, but have been unable to get this working. I keep getting stuck in an infinite loop. I'm trying to redirect a specific url to a child of that url. eg: Redirect 301 /category/parent-cat http://domain.com/category/parent_cat/child_cat ...

.htaccess redirect

Hi all, Just wondering if someone can help me with the following issue. I want to redirect my site to a subdomain, whishc simply displays a maintenace page, allowing me to work on the main site. So I have the following code for my .htaccess: RewriteEngine On RewriteCond %{HTTP_HOST} ^domain.co.uk$ [OR] RewriteCond %{HTTP_HOST} ^www.d...

htaccess redirect: [everyone] [every page] -> [holding page] - except me?

I'm about to launch the latest version of my webapp and would like to ensure all visitors are redirected to a holding page while i make the transition. So i need an htaccess redirect that excludes my ip somehow? ...

Apache processing authentication directives before mod_rewrite rules

I'm using mod_rewrite to redirect people from one domain to another (whilst preserving the rest of the URL). Both domains point at the same codebase. One of the directories has authentication controlled by a local .htaccess file. These authentication directives get processed before the mod_rewrite rule are processed. Therefore the clie...

.htaccess codeigniter multiple domains

Hello, everybody I'd like to know if it is possible to organize the following structure of the CodeIgniter installation: - Main folder -- codeigniter -- images -- site1-application -- site2-application -- site1-index.php -- site2-index.php The main idea is to use the same images and codeigniter folder across the multiple web sites fo...

.htaccess code to deny folder browsing

Can you please tell me how to deny folder browsing using .htaccess file ...

Redirect http page to https

Hi all, Just a quick one - would anyone know the correct htaccess code to redirect a register.php page from http to https? When the site isn't on the register.php page it should redirect back to http://sitename.com/register.php. Many thanks. ...

redirecting several domains to one in .htaccess

I would like to add some code to my .htaccess to redirect several different domains to a single domain. I have seen code that will do this for one domain such as: RewriteCond %{HTTP_HOST} ^www\.example\.net RewriteRule (.*) http://www.example.com/$1 [R=permanent,QSA,L] But what is the best approach to have multiple domains redirecte...

Can't figure out why my images will not display on this site

On this site: http://church.allthingswebdesign.com/ None of my images are displaying anymore. They used to, but i'm not sure why they don't anymore. Not sure if it's something i've changed or what. I'm 100% positive the images exist in the folder images because i've checked the remote copy of the files to make sure i can preview them ...

Error with htaccess rewrite

hi. I have a problem with two htaccess files that i have in a hosting at godaddy. I have multiple domains in the same hosting and therefore i usen htaccess which i found and which is working great: RewriteEngine On RewriteBase / # To redirect www.site1.com to /site1/ RewriteCond %{REQUEST_URI} !^/site1/ RewriteCond %{HTTP_HOST} ^(www\....

Domain Forward .htaccess

How can I forward short-dom.com to long-domain.com ? I keep seeing examples like: RewriteCond %{HTTP_HOST} ^a\.com$ [NC] RewriteRule ^(.*)$ http://www.a.com/$1 [L,R=301] RewriteCond %{HTTP_HOST} ^b\.com$ [NC] RewriteRule ^(.*)$ http://www.b.com/$1 [L,R=301] But these don't allow me to specify my short domain (all combinations of it ...

Staging area ptotection based on ip...what if my client has a dynamic IP?

I'm trying to put online a staging area for an upcoming website... I'd usually rather use an htaccess rule to enable only me and my client to see the website...i think is safer and you dont need to rememebr passwords and so... but my client this time has an internet provider who doesnt give him a static ip, aparently everyday or so, his...

How do I use space and non-ascii characters in .htaccess files

Hi, in .htaccess imposibla use space, non-Latin characters and etc. ? For example how, fix this: RewriteRule ^/(.*)/new user/(.*)$ /page/?id=$1 [QSA,L,E] this decision is not me: ... /new_user/ ... Thanks ...