[pmwiki-users] .htaccess question

Petko Yotov 5ko at 5ko.fr
Thu Mar 10 08:03:37 CST 2011


On Thursday 10 March 2011 09:37:43 Hans wrote:
> is it possible to conditionally have a section in
> .htaccess,  which is used when server is 'localhost',
> and one when server is not on my local machine?

Probably, see for example :

  http://stackoverflow.com/questions/736524

To enable CleanUrls RewriteRules on a specific host, you can do:

  RewriteEngine On
  RewriteBase /

  RewriteCond %{HTTP_HOST} ^www.my-domain.com$
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_FILENAME} !-l
  RewriteRule ^([A-Z0-9\x80-\xFF].*)$       /index.php?n=$1  [QSA,L]

Petko



More information about the pmwiki-users mailing list