.htaaccess configuration

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
mastersnake
Forum Newbie
Posts: 2
Joined: Mon Jan 11, 2010 5:40 am

.htaaccess configuration

Post by mastersnake »

Hello Guys.
i'm new to Apache & php .
i am actually a .NET Developer and the only reason that i want to do this is for one of our customers.
he have a PHP website and we have to do some modifications to it.
so for that we don't want these modifications tested in the website it self.
the customer want to see it in separate server and then if it was good we will apply it in the website.
SO what we did is installing the website through the FTP.
and then we created a Hyper-V VM and we installed windows xp on it.
and then apache 2.2
and we put the website files in c:\appserv\www\mywebsite
so now when i navigate through IE
i wrote http://Computename/mywebsite and the website opened
but if i navigate to any page it give me page not found error.
so i figured out that i need to enable mod_rewrite and modify .htaaccess in mywebsite
now for the question
how to modify the .hta access.
this is the current one

php_flag register_globals On
php_flag allow_call_time_pass_reference 1

DirectoryIndex index.php

RewriteEngine on
RewriteRule ^.htaccess$ - [F]
RewriteRule captcha_files/securimage/securimage_show\.php captcha_files/securimage/securimage_show\.php [L]
RewriteRule colorpicker\.css css/color_picker/colorpicker.css [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-s
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule !\.(js|ico|gif|jpg|jpeg|JPG|png|css|html)$ index.php [L]
RewriteCond %{HTTP_HOST} !^www\.livewebsite\.com [NC]
RewriteRule ^(.*)$ http://www.livewebsite.com/$1 [R,L]


and thx in advance
mastersnake
Forum Newbie
Posts: 2
Joined: Mon Jan 11, 2010 5:40 am

Re: .htaaccess configuration

Post by mastersnake »

Guys Anyhelp?
Post Reply