jdock1 Posted July 9, 2009 Share Posted July 9, 2009 Meaning, I put code into .htaccess, and the server will see all .htaccess commands through a php file. I need this done because Im creating a script that writes server commands to a php file. I dont think its possible to use fopen and fwrite or whatever to .htaccess files. So is there anyway I can do this? Thanks!! Link to comment https://forums.phpfreaks.com/topic/165311-is-it-possible-to-make-a-htaccess-file-read-to-a-php-file/ Share on other sites More sharing options...
Q695 Posted July 9, 2009 Share Posted July 9, 2009 Are you talking about something like myspace, or something more complecated, because you could have the system read the variables into two different things, one to create the page, and one to edit/rewrite the page, but it would be easier to pull that right from the database. Link to comment https://forums.phpfreaks.com/topic/165311-is-it-possible-to-make-a-htaccess-file-read-to-a-php-file/#findComment-871794 Share on other sites More sharing options...
jdock1 Posted July 9, 2009 Author Share Posted July 9, 2009 Are you talking about something like myspace, or something more complecated, because you could have the system read the variables into two different things, one to create the page, and one to edit/rewrite the page, but it would be easier to pull that right from the database. Not really. What I mean is this: I wrote a few files that get input from a text field and put it into a php or text file. The input is actually server commands, and the file is name .htaccess.php or .txt I did this to rename it to .htaccess by removing the extension. Im wondering if there is a way that I can make a .htaccess file but with an extension as .php or .txt, and the server still be able to read it. Im sure this would have to do with more server side admin, but not sure if there is a category about that on here. Link to comment https://forums.phpfreaks.com/topic/165311-is-it-possible-to-make-a-htaccess-file-read-to-a-php-file/#findComment-871798 Share on other sites More sharing options...
Q695 Posted July 9, 2009 Share Posted July 9, 2009 It's in the web server section on the forums. Link to comment https://forums.phpfreaks.com/topic/165311-is-it-possible-to-make-a-htaccess-file-read-to-a-php-file/#findComment-871803 Share on other sites More sharing options...
trq Posted July 9, 2009 Share Posted July 9, 2009 I'm still not really sure what exactly it is your trying to do but, you can name your .htaccess file whatever you like, Take a look at the AccessFileName directive in within your httpd.conf file. Link to comment https://forums.phpfreaks.com/topic/165311-is-it-possible-to-make-a-htaccess-file-read-to-a-php-file/#findComment-871828 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.