.htaccess

PHP - Why do i get Undefined index on $_GET variable? (possible .htaccess clash)

Hello, I'm trying to make a data filter with php and to do so, I want to use a form with 'get' method. Not the problem is, that I get this notice, when I'm trying to refer to any of the $_GET['var']'s. echo $_GET['kraj']; Notice: Undefined index: kraj in C:\wamp\www\inc\pages\filtr.php on line 23 And here is the URL code: What I...

URL error in Article Dashboard Script

Hey Guys Ive got a website with Article Dashboard installed, you can find it here http://www.linux-website-hosting.com/ The problem is, Search engine friendly urls are activated in this script, so is ioncube and I cant turn search engine friendly urls off. So now, when I click on any of the categories or test articles, i get a page not...

Drupal .htaccess

I am using Drupal in my website but there are some folders outside drupal. I want to exclude those folders from rewrite rules. I already tried : RewriteCond %{REQUEST_URI} !^/admin/ in .htaccess Options +MultiViews in apache config ...

use RewriteMap in htaccess file

How can i use RewriteMap directive in htaccess file? When i put it there i get "RewriteMap not allowed here" error. I know this error will disappear when put it in httpd.conf or virtualhost configuration file. But i want to know is it possible to put it in htaccess or not? ...

Regex working in testing program but not in .htaccess

I'm trying to redirect a URL that looks like 'accommodation/destination.php?code=108459&destination=Yang+Chum+Noi' The regex I'm using: (^accommodation/destination\.php\?code=([0-9]+)&destination=([^/]+)$) ...works fine in my regex tester but when I use it in the .htaccess file it doesn't work. Am I missing something here? ...

Set Content-Disposition header to attachment only on files in a certain directory?

I've got this this rule in my htaccess file to force linked files to download rather than open in the browser: <FilesMatch "\.(gif|jpe?g|png)$"> ForceType application/octet-stream Header set Content-Disposition attachment </FilesMatch> Is there a way to alter the RegExp so it only applies to files in a certain directory?\ Thanks ...

How to do htaccess redirect based on cookie value

I have failed at Google and I could not find the answer searching here. Sorry, I'm a newb at htaccess and it has really odd syntax and is so hard to learn! You can see what I'm trying to do here... RewriteEngine on RewriteCond %{HTTP_COOKIE} ^.*user_id=(\d+).*$ [NC] RewriteRule .* http://localhost/mysite/cache/$1 [R=301,L] RewriteRule ...

HTAccess ReWrite Rule - Folder to variable - Specific

Hey everyone. I've found examples of rewriting a URL to a variable, given that you go example,com/r/33 and the variable would be r=33. I'd like for the variable name to be default, and just put example,com/33 and then the php would get r=33 Specifics.... I would like our site http://www.buybattle.com/houston to pass city=houston to the ...

.htaccess - How do you do this? http://www.example.com/domain.com

i want to use somthing like http://www.example.com/domain.com instead of http://www.example.com/index.php?url=domain.com. how can I do this using .htaccess? update: i finally figured it out. :) RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.+)$ index.php?url=$1 http://www.pagerankcheckertool.com/facebook.com ...

Serving static files with apache and mod_wsgi without changing apache's configuration?

I have a Django application, and I'm using a shared server hosting, so I cannot change apache's config files. The only thing that I can change is the .htaccess file in my application. I also have a standard django.wsgi python file, as an entry point. In dev environment, I'm using Django to serve the static files, but it is discouraged i...

mod_rewriting fun with two .htaccess files...one for wordpress and one for CI in a subdirectory

I have a weird situation that's come up, so I'm hoping some one can help me out. I have a wordpress installation in the root directory and a codeigniter installation in a subdirectory (I know, I know...). Both are working fine on their own. The codeigniter installation has its own .htaccess file for rewriting to index.php. But what if ...

rewrite php file in htaccess with our without query string

So I have photographs.php, and there are also sections where it will be rewritten as photographs.php?cat=somecategory Question is, in .htaccess how do I get these both to work as such /photographs and /photographs/somecategory so that the $_GET['cat'] variable will be = somecategory ...

htaccess rewrite base url

Anyone out there good with htaccess and mod rewrite - i need your help! I need to rewrite the base part of a url. for example all requestst to http://domain1.com need to go to http://domain2.com The requests will typically be in the form as follows: http://domain1.com/main/test?q=1 i then need to go to http://domain2.com/main/test?q...

Last-Modified not working for .htaccess

I'm tyring to implement browser caching and follow Google PageSpeed's recommendation about setting Last-Modified to a data that is "sufficiently far enough in the past." I have the following in my .htaccess: <IfModule mod_headers.c> <FilesMatch "\.(json|pdf|swf|bmp|gif|jpeg|jpg|png|svg|tiff|ico|flv|js)$"> Header Set Last-Modified "Fr...

Use htaccess to mask folder name

Here's a problem I'm always wanting to solve with htaccess. I haven't found a way yet, though it looks like it should be possible - perhaps someone can help. Let's say I have a folder at the root of my site called /foo/. I want users to be able to access that folder at the path /bar/, but for various reasons I can't rename the folder. ...

htaccess redirect 301 all to one domain

I have 3 domains: domain1.com domain2.com domain3.com I want to 301 redirect all to domain3.com/$1. That includes domains with www and non-www. domain1.com -> domain3.com www.domain1.com/$1 -> domain3.com/$1 domain2.com -> domain3.com www.domain2.com/$1 -> domain3.com/$1 domain3.com X-> domain3.com (no redirect) www.domain3.com/$1 -...

Wordpress and Drupal on the same domain cause htaccess conflicts?

Have a client who wants to move their Wordpress.com blog over to their main domain that has a Drupal installation. If I add Wordpress to a "/blog/" directory on the server, will there be any conflicts with the htaccess ie Mod Rewrites etc? Thanks. ...

Need htaccess rule to remove javascript from specfic page footer of an website

I need htaccess rule to remove javascript from specific page of my website. In my htaccess file there is rule which embed js at the footer of all page of my website. I need rule which exclude specific page to embed the js. ...

protecting backend with htaccess and htpasswd - general question?

hey guys, i know it's rather easy to pass-protect a directory on my server with .htaccess and a .htpasswd file. however is it possible to protect just a file from beeing executed? e.g. i had something like a backend direcotry on my server with a normal index.php in it. now i got rid of the directory and i have a backend.php in my root...

wordpress folder / slug redirect

how do I redirect a category or page /my-page/ to a new page /my-new-page/ using htaccess? ...