Log In

Email:
Password:
Keep me logged in

Forgot Password

Email:




Archives
2013
March (7)
February (13)
January (14)
2012
December (12)
November (12)
October (12)
September (6)
August (12)
July (6)
June (12)
May (6)
April (12)
March (6)
February (12)
January (12)
2011
December (11)
November (14)
October (11)
September (4)
August (16)
July (8)
Categories
CSS (28)
jQuery (116)
PHP (52)
.htaccess (5)
iPod (1)
iPhone (16)
Sponsored Links


Custom Filename Extensions
.htaccess
Browse Category | Wednesday, June 6, 2012 |

Description: Allows filename to have a custom extension (e.g., 'page.php' to 'page.wcet')







.htaccess:
Filename must be called .htaccess, which is the filename that will allow your pages to be rewritten with other extensions.
RewriteEngine On

RewriteRule ^([a-zA-Z0-9_-]+)\.wcet$ $1.php

#The rules above mean that any .php can be rewritten as a ".wcet" file
#Example: page.php can be rewritten as page.wcet
#The ".wcet" extension is just an example; it can be changed to something else.
PHP:
page.php, file that will be rewritten with any extension you want.
<?php

echo 'This is the page that should be able to be rewritten.
<a href="page.wcet">See the URL rewritten.</a> '
;

?>
 0    2
Views: 537 Downloads: 22




(Optional in case you want a reply)



1 Comment
Sanny
Would u mind explaining what u were writing

Thursday, Febuary 28, 2013 at 3:01:44 PM