On my website I have an affiliates/ folder.
Inside that I have showgames.php
I want to be able to access the file as http://www.website.com/affiliates/showgames.aff
Inside affiliates folder,I placed this .htaccess
AddType application/x-httpd-php .php .aff
RewriteEngine on
RewriteBase /
RewriteRule ^(.*)\.php$ $1.aff [R=permanent]
For some reasons , it doesnt work .
You misunderstand what rewriting is.
You say you have a
/affiliates/showgames.phppage that you want to be accessible as/affiliates/showgames.aff. This means the second must be internally rewritten to the first when it’s requested, not the other way around.This also means that you do not need to interpret
.afffiles as PHP scripts. Just do this inaffiliates‘ .htaccess: