.htaccess

Make Folders in Apache Case Insensitive using .htaccess

I need to make accessing directories on my server case insensitive. How do I do that using htaccess? ...

This htaccess ban list does not work.

I have about 20 domains in my htaccess file but the domains are still getting through. Can someone please tell me what I am doing wrong? RewriteCond %{HTTP_REFERER} 78safd\.net [NC] RewriteRule .* - [F] ...

Legacy links rewrite

I need to rewrite: index.php?node=[something] to /node/[something] (the "node" part will be static text and it's not important) i've tried: RewriteRule ^index\.php?node=(.*)$ /node/$1 [L,R=301] (again the rewritten "node" part will be static text and it's not important) and a lot of other variations without success... Thanks...

.htaccess mod rewriterule and ampersands

I've been struggling with this for two days right now. At the moment I have the following rewrite rule: RewriteRule ^(.*)$ index.php?u=$1 [NC,L] Which ports everything behind example.com/ to index.php as the GET variable u. Which is being processed in index.php with an explode to define te different arguments being: the city (betwee...

optimizing Pretty URLs in .htaccess

This is the code I use, <IfModule mod_rewrite.c> RewriteCond %{SCRIPT_FILENAME} !-d RewriteCond %{SCRIPT_FILENAME} !-f RewriteRule ^([^/]+)/?([^/]+) index.php?user=$1&do=$2 [L] </IfModule> if i give it abcd/1234 it will capture abcd first then 1234 as the second variable. But if the url was abcd/ or abcd the first capture stays th...

Blocking "hacking" attempts via .htaccess

Hi, I am trying to block request been made to our pagination parameter by multiple robots (evil ones it seems) Hundreds of these types of requests are showing up: http://www.ourdomain.com/search.php?q=search+query&amp;page=366100876 Is there a way using regular expressions in .htaccess to send any request that requests a page larger ...

Amazon EC2 php/fedora htaccess mod_rewrite not working

Amazon EC2 with Fedora, there are 2 instances of the httpd conf, the doc root is automatically set as /home/webuser/helloworld/conf/httpd.conf and the default (which is also there) is /etc/httpd/conf/httpd.conf . Mod rewrite is enabled with both, we are in drupal, the .htaccess is in the folder it needs to be (on Drupal) and it loads t...

Wordpress .htaccess errors

Thanks in advance to all you .htaccess guru's out there. I'm having an issue that's been bothering me for some time. I have wordpress nested inside my own site folder structure. To the user, everything is cool. But when i go to www.domain.com/blog/wp-admin, my credentials will not log in. It just keeps looping me around to the same ...

i want .htaccess code know if the php istalled in the server

i want .htaccess code know if the php istalled in the server and if it not installed i will deny acess any php file now i want a .htacss code determine if the php is installed in the server ...

Logical AND in htaccess modrewrite ?

This is my htaccess file RewriteBase / RewriteCond %{HTTP_HOST} ^example.com [NC] RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301] RewriteCond %{REQUEST_URI} !^/chat/ RewriteCond %{REQUEST_URI} !^/m/ RewriteCond %{REQUEST_URI} !^/__admin/ RewriteCond %{REQUEST_URI} !^/gzip_headers.php RewriteCond %{REQUEST_URI} !^/phpfreechat/...

long url rewriting with htaccess

here is my url http://www.mydomain.com/browse.php?type=3d&amp;subtype=started&amp;ref=foo how an i convert this to... http://www.mydomain.com/browse/3d/start/foo i have seen many questions on stackoverflow but none have given and related ans to my prob... ...

using mod_rewrite with $_GET

I'm trying to make seo to search queries. i've got a form like this: <form action="index.php?<?=$_GET['search-input01']?>'" method="get"> <p class="nom t-center"> <label for="search-input01">All:</label> <input type="text" size="75" name="q" id="search-input01" /> <input type="image" src="design/search-button.gif" cla...

Redirecting a dynamic page to a new dynamic page

My site has the following url structure: /shoe/view/3 /shoe/view/5 /shoe/view/86 /shoe/view/124 I want to 301 redirect everything using htaccess to a new structure like so: /item/3 /item/5 /item/86 /item/124 ...

Subtle htaccess problem. I am going insane.

I want to have my primary domain be hosted from a subdirectory (have completed this step somewhat), i.e. when someone types in www.example.com/news behind the scenes it will go to www.example.com/subdirectory/news but will still show up as www.example.com/news. I have used the following bluehost code to accomplish this: RewriteEngine o...

how to rewrite search[] to something else with htaccess

I have created a search form with get method. But when the url looks like this search.php?search[] or search?search[] (mod_rewrite) then I get a sql fattal error. It's passing an array and I want to avoid that problem. my question is how do I redirect a person from that url to search.php ...

htaccess redirect 301

Google says that the content is duplicated www.example.com/pagedcontent/page3 / www.example.com/pagedcontent/page3 I redirected using redirect 301 for each page, but as they are already more than 150 pages would like to use a single instruction in the htaccess. How to do? Please I want to redirect to www.example.com/pagedcontent/pa...

Htaccess redirect

Does anyone have a simple way of rdirected in .htaccess all pages that were once .asp to now be .php. For example index.asp is now index.php etc. Server is apache. ...

How to serve gziped an otf font using htaccess+php.ini? (no mod gzip or deflate)

Im asking this here cause if i try more i think im going to lose my mind for sure it seems i can't use php_value or php_flag but linking a php.ini using suPHP_ConfigPath works (for php files) here's a list of stuff i tried in random order: AddHandler application/x-httpd-php .otf AddType default_mimetype application/vnd.oasis.opendocumen...

.htaccess can't redirect .pl files.

Has anyone had an issue where you try and do a redirect of a .pl file and that file just shows up as forbidden? Here is an example of what I'm trying to do: (http://www.oldsite.com/folder/sample.pl) needs to redirect to... (http://www.newsite.com/newpage/) Here is what I have put in the .htaccess file which is located in folder on the...

How can I get ErrorDocument in .htaccess to output wrong uri parameter?

Hi, I've worked-around the solution to transform all uri to one page via ErrorDocument. The reason behind this is to send Files AND folders (nice urls) to one page. However, I need the URI string to be sent to index.php?uri=string . Is this possible via ErrorDocument, or how do I do this? So I need to rewrite the http://www.some...