The Little Guy Posted November 7, 2008 Share Posted November 7, 2008 Is it possible to remove newlines and tabs in the html output using htaccess? Quote Link to comment https://forums.phpfreaks.com/topic/131748-newlines-and-tabs/ Share on other sites More sharing options...
corbin Posted November 7, 2008 Share Posted November 7, 2008 No. Htaccess never directly messes with HTML. You could do it with PHP and output buffering though. (Or, if they're static pages, mod rewrite could be used to redirect them to a PHP page and remove the newlines and what not.) Quote Link to comment https://forums.phpfreaks.com/topic/131748-newlines-and-tabs/#findComment-684495 Share on other sites More sharing options...
The Little Guy Posted November 7, 2008 Author Share Posted November 7, 2008 That is what I have been "Trying" to do, here is my htaccess: Options +FollowSymlinks RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ merge.php?url=$1.php [L,QSA] I have not yet figured out how to remove the newlines and tabs in the php... Here is my other post for doing the php part: http://www.phpfreaks.com/forums/index.php/topic,224535.0.html I still can not figure out how or what the best way to do this is.. Quote Link to comment https://forums.phpfreaks.com/topic/131748-newlines-and-tabs/#findComment-684685 Share on other sites More sharing options...
corbin Posted November 7, 2008 Share Posted November 7, 2008 ob_start(); require 'somefile.php'; $output = ob_get_clean(); //output now contains what ever was output in somefile.php Quote Link to comment https://forums.phpfreaks.com/topic/131748-newlines-and-tabs/#findComment-684932 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.