.htaccess

How can I ensure my website always opens as www.mysite.com and not mysite.com - this messed up my Google OpenID logins?

Hi guys, my website has a log in by open id feature. When a user logs in for the first time using his/ her openid they are redirected to a create account page. I noticed just recently that one user when logged in using her google account created an account for the first time. However when she tried to log in again using the same google a...

You don't have permission to access /index.py on this server.

I am setting up a simple test page in Python. I only have two files: .htaccess and index.py. I get a 403 Forbidden error when trying to view the page - how can I fix this? .htaccess: RewriteEngine On AddHandler application/x-httpd-cgi .py DirectoryIndex index.py index.py: #!/usr/bin/python print "Content-type: text/html\n\n" print "...

.htaccess, mod_rewrite and subdirectories

Concerning the .htaccess documenation, putting a .htaccess file in a directory should affect this directory and all subdirectories. But I have problems getting this to work: I have to files, alice.html and bob.html (just printing "Alice" and "Bob"), and this .htaccess in the same directory (/tmp/rewrite): RewriteEngine on RewriteBase /...

My domain is masked forwarding to another domain, can they see where my URL referrals are coming from?

My domain is masked forwarding to another domain, can they see where my URL referrals are coming from? Meaning, my domain is advertised for certain Google keywords. Will they be able to see this? I think it is not possible and masked forwarding is like redirecting. They can see that my referral URL is mydomain.com, and not google.com. ...

How to get a domain un-indexed by search engines

Hello all, I have a domain with a loto of indexed pages, I use this one as a online test domain. I understand that I should test it on a intranet or somewhat, but in time Google indexed a few websites which are not relavent anymore. Does anyone know how to get a domain totlally unindexed from the most search engines? ...

.htaccess rewriting

When I use URL rewrite styles my scripts are rewritten too. How can I fix this? For example, I have redirection /contact/ /index.php?page=contact, css and script files style and scripts folder, so I want style/layout.css to still be readable by my program after a redirect. ...

ModRewrite Split Issue

This is a complicated one which I hope has a simple answer... RewriteRule ^category/([^.]+)/([0-9]+)/([^.]+)/([0-9]+) category.php?c_id=$2&filters=$3&_p=$4&name=$1 This rule would pick up category/kitchen/10/0-0-0-0-0-0-0-0/1 with the following get vals: category.php?c_id=10&filters=0-0-0-0-0-0-0-0&_p=1&name=kitchen The reason fil...

How do I write a .htaccess file to make CodeIgniters URL routing work?

I'm running a LAMP environment with CodeIgniter. I want to be able to use its URL pattern, like, http://localhost/controller/function/ID, but by default it has to be http://localhost/index.php/controller/function/ID. The user guide says that I need a .htaccess file to make the former style possible, and uses this as an example: RewriteE...

Use web interface to modify htaccess file

The solution to a previous question (How to implement “Maintenance Mode” on already established website), was to use a modified .htaccess to deny IP addresses. What is the best way to use a web interface to modify an .htaccess file? What I want is a way for an admin to log in to the admin area and switch Maintenance Mode on and off usi...

Show no_picture.png by .htaccess if picture is not exist.

Hi, I want to show no_picture.png if requested picture does not exists. I should do it with .htaccess. Thanks a lot. ...

Can't access index.php in Drupal even after .htaccess modification.

I can't access my index.php file within a subdirectory of my Drupal installation. I can access other subdirectories index files and I can also access the subdirectory and see its contents when I remove the index.php file. I've made changes to my .htaccess file a while back which should allow any index.html, index.php, or index.htm file t...

Gallery 2 htaccess deleted while permalink and rewrite plugins active!

I deleted my htaccess file from my gallery2, problem is I have the permalink and rewrite plugins running, now I can't get inside my admin panel to retrive the htaccess code. Can somebody help? ...

Why Apache doesn't gzip css or js files which have parameters ?

Hi all, Some CSS & JS files are not compressed by apache with mod_deflate enabled. This files looks like this "[domain.name]/aggregator.css?..." or "[domain.name]/misc/jquery.js?..." in YSlow. The other CSS & JS without the "?" gets compressed. Kindly explain me how do I make apache compress this files also. Thanks ...

How to write a php/htaccess script to redirect form variables to another website

Hey here is my problem : i made a flash and i can`t change it no mather what. That flash had a form that was sending data to my subdomain.. i had to remove the subdomain and i got a new website, the problem is this : how do i redirect the form data from the old site to the new one? In the flash i had the form send the data to : subdomain...

Is there a way to find out if a server supports mod_rewrite & .htcaccess

Is there a way to find out if a server supports mod_rewrite & .htcaccess ...

htaccess regular expression - dont follow pattern

Hey, I have a problem with the regular expression at the bottom. I'm trying to pass all patterns except index.php, robots.txt and any css and js file through the index file, however I have one specific path where I need to process js and css files through php. Normally my url structure is like this: example.com/class/function lets say...

Mapping folder to a different server via htaccess

Our website currently servers images from a website.com/images/ folder. Thing is we have limited bandwidth on that server and the images are sucking it up. We have another server with a lot more free bandwidth. Is there any way to maps /images/ to goto the other server where we'll upload that folder? This would save us from needing to...

mod_rewrite Redirect Rule Variables question

I'm a bit of an .htaccess n00b, and can't for the life of me get a handle of regular expressions. I have the following piece of RewriteRule code that works just fine: RewriteRule ^logo/?$ /pages/logo.html Basically, it takes /pages/logo.html and makes it /logo. Is there a way for me to generalize that code with variables, so that it...

Can I add php_value magic_quotes_gpc off to .htaccess?

My current .htaccess has the following. RewriteEngine on RewriteCond %{SCRIPT_FILENAME} !-f RewriteCond %{SCRIPT_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 Can I add the following to .htaccess? php_value include_path ".;C:/xampp/htdocs/phpweb20/include" php_value magic_quotes_gpc off php_value register_globals off ...

htaccess Redirect from subdomain to domain

I'm re-working a site and I'm attempting to move a forum from a subdomain (board.example.com) to the primary domain where the path will be example.com/index.php/forums/ I've set up my htaccess file like so: RewriteEngine On RewriteCond %{HTTP_HOST} ^(.*).example.com RewriteRule ^(.*)$ http://www.example.com/index.php/forums/ [R=301...