•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 423,017 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,992 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 1773 | Replies: 4
![]() |
•
•
Join Date: Apr 2007
Posts: 13
Reputation:
Rep Power: 2
Solved Threads: 0
hello my friends 
I'm new to web dev so ive started learning PHP.
i have a couple of questions...
1. Can i change the default .php extension to .whatever ?
2. Can i change something.html to something.whaever extension? in Apache Mod rewrite? i mean SEO. i want to make fake extension that can show like this:
index.jsp
whatever.jsp etc...
i know im using PHP but would it be possible change to .jsp extension? ive installed XAMPP on my local PC and I edited Apache.conf file and added index.jsp next to the AppDirectory. so shouldn't it allow .jsp extension?
if so please explain it in detail as much as you can.
anyhelp would be much
appreciated

I'm new to web dev so ive started learning PHP.
i have a couple of questions...
1. Can i change the default .php extension to .whatever ?
2. Can i change something.html to something.whaever extension? in Apache Mod rewrite? i mean SEO. i want to make fake extension that can show like this:
index.jsp
whatever.jsp etc...
i know im using PHP but would it be possible change to .jsp extension? ive installed XAMPP on my local PC and I edited Apache.conf file and added index.jsp next to the AppDirectory. so shouldn't it allow .jsp extension?
if so please explain it in detail as much as you can.
anyhelp would be much
appreciated
Last edited by stymiee : Jul 21st, 2007 at 10:37 pm. Reason: removed unecessary bbcode
Take a look at this, perhaps it will help:
http://www.evolt.org/article/Search_...ache/17/15049/
http://www.evolt.org/article/Search_...ache/17/15049/
•
•
Join Date: May 2006
Location: New Jersey
Posts: 1,422
Reputation:
Rep Power: 5
Solved Threads: 34
There are two ways to do this:
1) Tell Apache to parse all .phpfiles a .xxxfile. Using this method you do not have to change any files extensions or worry about any redirects. To do this, place this code in your httpd.conf file:
2) Use a 301 redirect to redirect from the .php files to the .xxx files. You can do that by placing this code in the root directory of your website:
1) Tell Apache to parse all .phpfiles a .xxxfile. Using this method you do not have to change any files extensions or worry about any redirects. To do this, place this code in your httpd.conf file:
AddType application/x-httpd-php .php .xxx
RedirectMatch 301 ^/(.*)\.php$ http://www.yourdomain.com/$1.xxx
John Conde
Brainyminds | Merchant Account Services | I Love Code
IT'S HERE: Merchant Accounts 101 Everything you need to know about merchant accounts!
Brainyminds | Merchant Account Services | I Love Code
IT'S HERE: Merchant Accounts 101 Everything you need to know about merchant accounts!
![]() |
•
•
•
•
•
•
•
•
DaniWeb PHP Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Similar Threads
- Apache (Linux Servers and Apache)
- Help in PHP extension (PHP)
- Newbie Question - Hiding php extension (PHP)
- Apache mod_rewrite with Google Ads (Linux Servers and Apache)
- Set up manually, php 5.0 with apache's compatible version (PHP)
Other Threads in the PHP Forum
- Previous Thread: Creating a new array dynamically for checkboxes?
- Next Thread: I m a beginner in PHP-Mysql



Linear Mode