Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can !
Moderator: General Moderators
ityd
Forum Newbie
Posts: 17 Joined: Tue Aug 08, 2006 8:16 am
Post
by ityd » Wed Aug 09, 2006 11:53 pm
How do I get a php script to not have an extension
http://mysite.com/script
script is a php file
My in the FAQ on the server they say to use a .htaccess in the main directory and use the code
Code: Select all
<Files filename_to_be_parsed>
ForceType x-mapp-php4
</Files>
However I get a 404 error. Any suggestions?
Thanks.
RobertGonzalez
Site Administrator
Posts: 14293 Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA
Post
by RobertGonzalez » Thu Aug 10, 2006 12:37 am
mod_rewrite and .htaccess. Read through the Useful Resources thread in the Apache, IIS and Servers forum.
Weirdan
Moderator
Posts: 5978 Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine
Post
by Weirdan » Thu Aug 10, 2006 12:51 am
ityd
Forum Newbie
Posts: 17 Joined: Tue Aug 08, 2006 8:16 am
Post
by ityd » Thu Aug 10, 2006 1:00 am
i'll give it a try...
ityd
Forum Newbie
Posts: 17 Joined: Tue Aug 08, 2006 8:16 am
Post
by ityd » Thu Aug 10, 2006 1:02 am
no still 404 error
ityd
Forum Newbie
Posts: 17 Joined: Tue Aug 08, 2006 8:16 am
Post
by ityd » Thu Aug 10, 2006 1:13 am
No. You want to give me a crash course in mod_rewrite in a .htaccess?
RobertGonzalez
Site Administrator
Posts: 14293 Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA
Post
by RobertGonzalez » Thu Aug 10, 2006 1:17 am
Search these boards for mod_rewrite. There have been a number of posts on it (many from me).
ityd
Forum Newbie
Posts: 17 Joined: Tue Aug 08, 2006 8:16 am
Post
by ityd » Thu Aug 10, 2006 1:44 am
Well this doesnt work
Code: Select all
RewriteEngine On
RewriteRule ^ status.php status
RobertGonzalez
Site Administrator
Posts: 14293 Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA
Post
by RobertGonzalez » Thu Aug 10, 2006 1:50 am
OK, take what you have and check it against the mod_rewrte cheatsheets I referenced in m earlier post.
ityd
Forum Newbie
Posts: 17 Joined: Tue Aug 08, 2006 8:16 am
Post
by ityd » Thu Aug 10, 2006 1:52 am
Sorry, I don't see your reference.
ityd
Forum Newbie
Posts: 17 Joined: Tue Aug 08, 2006 8:16 am
Post
by ityd » Thu Aug 10, 2006 1:53 am
Oh I see
ityd
Forum Newbie
Posts: 17 Joined: Tue Aug 08, 2006 8:16 am
Post
by ityd » Thu Aug 10, 2006 2:00 am
It seems there would be an easier way to fix this. I just want a website without any extensions.
Luke
The Ninja Space Mod
Posts: 6424 Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA
Post
by Luke » Thu Aug 10, 2006 2:16 am
how come?
ityd
Forum Newbie
Posts: 17 Joined: Tue Aug 08, 2006 8:16 am
Post
by ityd » Thu Aug 10, 2006 2:24 am
Looks cooler.
Anyway I got it
Code: Select all
<Files status>
ForceType x-mapp-php4
</Files>
This is used to take a file with no extension and parse it as if it were a php file. So I just went and change status.php to status. But thanks for all your help.