-2

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

4
  • Could you please elaborate? I'm pretty sure that I'm not the only one who does not have any idea of what you're asking.
    – jensgram
    Nov 18, 2009 at 14:02
  • Talking about the short_open_tag directive, perhaps? [php.net/manual/en/ini.core.php#ini.short-open-tag]
    – jensgram
    Nov 18, 2009 at 14:04
  • And what logic do you want to use?
    – Gumbo
    Nov 18, 2009 at 14:14
  • I presume you reworded the whole question after getting some answers. At this point, the question is meaningless and it's neither related to the subject nor the replies. When you edit, try to add rather than replace. Other than that, have you realized how little sense the question makes? You can overwrite a file called ".htaccess" the same way you overwrite a file called "Shoppint list.txt". Dec 16, 2009 at 15:29

5 Answers 5

1

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.

1

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

0
0

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

0

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

0

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.