WITHOUT FILE ENDINGS

You can make this even better by ditching the file ending altogether, so that you can visit either http://www.mywebsite.com/horses orhttp://www.mywebsite.com/horses/:

RewriteEngine On
RewriteRule   ^horses/?$   Xu8JuefAtua.html  [NC]

The ? indicates that the preceding character is optional. So, in this case, the URL would work with or without the slash at the end. These would not be considered duplicate URLs by a search engine, but would help prevent confusion if people (or link checkers) accidentally added a slash. The stuff in brackets at the end of the rule gives Apache some further pointers. [NC] is a flag that means that the rule is case insensitive, sohttp://www.mywebsite.com/HoRsEs would also work.


source - http://www.smashingmagazine.com/2011/11/02/introduction-to-url-rewriting/






# vi /etc/httpd/conf/httpd.conf

<Directory "/var/www/test">

    RewriteEngine on

    RewriteRule ^test/?$ test.php

</Directory>




Posted by linuxism
,



os-php-eclipse-pdt-debug-pdf.pdf



source - http://www.ibm.com/developerworks/opensource/tutorials/os-php-eclipse-pdt-debug/


'Development > PHP' 카테고리의 다른 글

php - @ operator  (0) 2015.06.11
php - stdClass  (0) 2015.06.10
php - eclipse zend debugger plugin install  (0) 2015.06.03
php - array  (0) 2013.06.19
php - foreach 문  (0) 2013.06.19
Posted by linuxism
,


apache HTTP server 2.4 notes

The 2.4 release introduced significant changes to the authorization and authentication process. Users of that release are encouraged to read this link to migrate their older config files.

Client denied by server configuration

This error means that the access to the directory on the hard disk was denied by an Apache configuration. It could be that access was denied due to an explicit deny directive or due to an attempt to access a folder that is outside of the DocumentRootIt can also happen when you are proxying and there's no access configured for the proxied location. And it is the default response to a PUT request.

These are some reasons for this entry to be recorded in your ErrorLog:

  • The default Apache config includes Deny from all in the <Directory> block the DocumentRoot - this must be changed to allow access!

  • If you change the DocumentRoot, you will need to change the <Directory> block referring the old root, to the refer to the new root

  • You need a <Directory> block for every folder outside of your DocumentRoot, i.e. your cgi-bin folder.

  • You need a <Directory> or <Location> block for every Alias.

  • You need a <Location> or <Proxy> block for your proxy

To fix this problem, look at the line in your ErrorLog, to find out which folder it is trying to access. 
If a <Directory> block already exists for that folder, make sure it is set to allow access as necessary. If not, add a <Directory> block to your Apache configuration file, allowing access as required. See the example below for folder /usr/local/awstats/htdocs.

<Directory /usr/local/awstats/htdocs>
  Order allow,deny
  Allow from all
</Directory>

This directory block will allow Apache to serve files from this location, in response to an incoming request. This assumes either you have an Alias set up somewhere for serving content from this directory or, less likely, that your DocumentRoot is /usr/local or /usr/local/awstats.

ProxyPass /foo http://internal.foo.com:8900/
ProxyPassReverse /foo http://internal.foo.com:8900/
<Location /foo>
  Order allow,deny
  Allow from all
</Location>

This Location block will allow Apache to proxy content for /foo. This Location block is only needed if there is earlier Proxy or Location block denying access to this resource. Some Linux distributions like Debian put Proxy block with "Deny from all" in their default mod_proxy configuration.

Example

[Fri Jan 16 15:00:42 2009] [error] [client ::1] client denied by server configuration: /var/www/phpmyadmin/

Adding "Allow from 127.0.0.0/255.0.0.0 ::1/128" to the ACL, will prevent the apache internal process from erroring.



source - https://wiki.apache.org/httpd/ClientDeniedByServerConfiguration






위 예시에서 다음은

<Directory /usr/local/awstats/htdocs>
  Order allow,deny
  Allow from all
</Directory>


다음으로 변경됨

<Directory /usr/local/awstats/htdocs> Required all granted </Directory>


Posted by linuxism
,