Need APACHE SEF help SOLVED MUST READ

by 5 replies
6
I don't believe I got this right... Someone please check me on this.
The problem I'm having is that in the root directory of my site I created a folder named 'Graphic_Logo_Design_Artist_Gallery'. Inside this there is an '.htaccess' file containing the following:

<Files category>
*ForceType application/x-httpd-php
</Files>

Am I wrong in assuming that if I now create a file named 'category' without the '.php' extension at the end and that file simply contains:

<?php
include('category.php');
?>

Should I not be able to access the content on 'category.php' simply by going to the following link?:

http://www.mysite.com/Graphic_Logo_D...llery/category
#programming #apache #htaccess #php #sef
  • it should work.. however it depends on your htaccess settings.. it might not overwrite settings from htaccess in root file

    I'm just a bit in a hurry so I don't have time to check but I don't believe that '*' should be there.... the line you wrote basically means.

    Every requested file by a browser is parsed through php on your server.
    • [ 1 ] Thanks
    • [1] reply
  • Hey phpspaz,

    hehe I'm just now really reading your nickname funny
    Glad you solved the problem.. I've had those days too as times .htaccess can be real head breaker especially because it is pretty much impossible to debug.. its just trial-n-error.

    I saw you already noticed this but I wrote my reply wrong 'that '*' should be' should have been: 'that '*' should NOT be', of course

    Just my extra 2 cents try to keep all htaccess rules just in the root htaccess file.
    Often is not necessary to make extra .htaccess files in subdirs. This is only useful when you have a lot of rules for a sub folder (which are not useful for the rest of the site, it makes page a bit faster)

Next Topics on Trending Feed

  • 6

    I don't believe I got this right... Someone please check me on this. The problem I'm having is that in the root directory of my site I created a folder named 'Graphic_Logo_Design_Artist_Gallery'. Inside this there is an '.htaccess' file containing the following: