We help IT Professionals succeed at work.

Update .htaccess filr with PHP script?

sabecs
sabecs asked
on
Hi,
is it possible to update a .htaccess file using a PHP script?

Thanks,

Andrew
Comment
Watch Question

yes
just write it as a normal txt file
$handle = fopen("/pathonserver/.htaccess", "w");
			fwrite("something\n");
			fwrite("otherthing\n");
			fclose($handle);

Open in new window

Author

Commented:
thanks...