|
Hi,
I am using a shared hosting, i need to disable gettext extension for my application due i need to redeclare _(). Is it possible to disable an extension on php runtime or vie .htaccess ?
Started by shuxer on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
I'm assuming kill performance if ....
Wordpress uses __() (two underscores) and php-gettext for translation.
To change php settings with an .htaccess file is to use
php_admin_value disable_functions
But as far myself, though.
|
|
Just putting in context to clarify the main question:
On my development machine, PHP5.3.1 is installed on Apache as a module, I use SetEnv APPLICATION_ENVIRONMENT development in my application's root .htaccess file. It is then easily retrievable from ...
Started by Steven Rosato on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
It consists of just adding....
Ok I finally got with it.
Another .htaccess with:
SetEnv APPLICATION_ENVIRONMENT staging
In a php script is is retrievable via as seen from PHP -- if yours is not in there, it's not a good sign for you...
|
|
Is there a difference between php header redirect and .htaccess redirect by the SEO of the site? 10x
Started by Novinite on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
In PHP:
header("Location: http://www.example.com/"); /* Redirect browser, emits.
If you're doing this in your .htaccess :
Redirect 302 /PATH_TO_REDIRECT doing your redirection.
In the PHP documentation .
|
Ask your Facebook Friends
|
From a performance only view, which would be the best way to block 30 IP addresses?
A) .htaccess file
or
B) PHP code in the file
Started by jasondavis on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
Another way of seing things is maintenance at the firewall level... .
.htaccess ) should require less resources than Apache+PHP.
htaccess means only Apache, and no PHP to load/compile/execute ; I'm guessing Apache alone (i.e.
|
|
On my PHP site I would like to sometimes show a maintenance page to users. I know I can do this in PHP very easily but I would rather use an htaccess file, I think performance may be better this way. So what I am wanting to know is can I modify a htaccess...
Started by jasondavis on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
You would have to give the web server user (who traditionally has very low privilege) write access to .htaccess; all you need-switches maintenance mode stick....
I would strongly recommend not writing .htaccess from PHP.
Maintenance.
|
|
If I use mod_rewrite to control all my 301 redirects, does this happen before my page is served? so if I also have a bunch of redirect rules in a php script that runs on my page, will the .htaccess kick in first?
Started by Chris on
, 8 posts
by 8 people.
Answer Snippets (Read the full thread at stackoverflow):
The .htaccess is performed....
Hope this helps.
So, it have to be take in charge before your PHP.
This file folder with your htaccess file.
Hi!
htaccess is controlled by the webserver.
Before any of your PHP code executes.
|
|
I have a PHP web app located on shared hosting . My goal is to modify .htaccess file from PHP code when the PHP page is running. I need that .htaccess to insert a couple of mod_rewrite lines into it.
The problem is that on Windows+Apache I can dinamically...
Started by PHP thinker on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
You only need a small set with editing the .htaccess....
Of the reasons that rewriting the .htaccess is a bad idea is that any requests that come in while the .htaccess is being rewritten will not have any of your redirects applied.
|
|
Hi to all gurus,
I code same lines all PHP programs at one of my projects. Is it possible to do this at .htaccess for a directory? And how?
PHP codes:
Header('Content-Type: application/xhtml+xml; charset=utf-8'); Header("Cache-Control: no-transform");...
Answer Snippets (Read the full thread at stackoverflow):
Assuming all your files have .php extensions:
AddType application/xhtml+xml .php
Caching is set in mod_expires , but you need mod_headers to set Cache-Control:
<FilesMatch "\.php....
For the content type you use AddType from mod_mime.
|
|
Hi guys,
I need to have all PHP errors logged to a file on my centOS box. I think I'm doing everything I'm supposed to. Here's my .htaccess file:
php_flag display_errors off php_flag log_errors On php_flag error_log /var/www/vhosts/hostname/logs/fo_errors...
Started by synapse on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
php_flag display_errors off php_flag log_errors On php to your web....
php_flag is only used for setting boolean configuration properties.
You probably want to use php_value not php_flag when you set the log path.
|
|
Hi,
I'm editing the .htaccess file in order to make some overwrites to my php.ini file (I don't have access to it). So far, I've added:
php_value max_execution_time 600 php_value error_reporting E_WARNING php_value log_errors Off
The application I'm editing...
Started by FergatROn on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
(see value you should....
You should no meaning outside of PHP -- and when you're writting a .htaccess file, you are "outside of PHP".
They're not available in that environment.
You can't use the php constants in .htaccess.
|