tags:

views:

83

answers:

5

how i can write a PHP file that overwrites .htaccess with the correct information

+1  A: 

AFAIK this is not possible. Could your maybe share your "real" problem. You probably want to include some logic into .htaccess, right?

FrEaKmAn
yes i want to user logic in htaccess file
Mehul Panchal
A: 

This is not possible, .htaceess is controls the permission from Apache, it is not possible to add some code in this file.

Andreas Hoffmann
A: 

Short answer: Its not possible.

Long answer (that due to the lack of detail in the original question is still very short): What you are trying to do can (probably) be done in a much cleaner/better way. Elaborate your questions, state what you have tried and and what youre trying to achieve.

mizipzor
A: 

Rather than doing this, you could write a PHP file that overwrites .htaccess with the correct information.

Rich Bradshaw
A: 

What correct information? If you're using php to write css, and .htaccess is applying the HTML content type, add this line to your php: header('Content-Type: text/css');. If you're doing something else, do something else.

TRiG