how to get the .htaccess file to work

Asked by jonathan

I am working apache and I want to start working on several web pages. The files for right now are in several sub folders with each folder with the php files containing a .htaccess file. The .htaccess file looks likes this below:
<FilesMatch "^aboutme$">
    ForceType application/x-httpd-php
</FilesMatch>

<FilesMatch "^contact$">
    ForceType application/x-httpd-php
</FilesMatch>

<FilesMatch "^packages$">
    ForceType application/x-httpd-php
</FilesMatch>

<FilesMatch "^network$">
    ForceType application/x-httpd-php
</FilesMatch>

What I am trying to do is instead of the saving a .php file, I just have a file that contains php code. So the url would look like this /localhost/jon/public/network instead of this /localhost/jon/public/network.php

I cannot get the file to overwrite the centralize config file.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu apache2 Edit question
Assignee:
No assignee Edit question
Solved by:
Damiano Venturin
Solved:
Last query:
Last reply:
Revision history for this message
Best Damiano Venturin (damko) said :
#1

that's quite complex to be answered here
try to look the apache rewrite directive
for ex. this is a tutorial http://www.yourhtmlsource.com/sitemanagement/urlrewriting.html

Revision history for this message
jonathan (jejo5205) said :
#2

Thanks Damiano Venturin, that solved my question.