Go Back   CodingForums.com > :: Server side development > Apache configuration

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 02-10-2007, 04:56 AM   PM User | #1
karlosio
Regular Coder

 
Join Date: Dec 2006
Location: In the wilderness
Posts: 106
Thanks: 9
Thanked 5 Times in 5 Posts
karlosio is an unknown quantity at this point
accepting no extension and .html and .php in htaccess?

Im using htaccess to remove the .php file extension in urls however it is it possible to write a rule that could let a user type any of the following to access a page.php file on my server:

http://www.domain.com/page
(or) http://www.domain.com/page.html
(or) http://www.domain.com/page.php

This is my current htaccess:

Code:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ $1.php [L,QSA]
__________________
"The advantage of computers is that they do exactly what you tell them to do. The disadvantage of computers, on the other hand, is that they do exactly what you tell them to do."

Excellent resource for learning PHP here
karlosio is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 12:40 PM.


Advertisement
Log in to turn off these ads.