Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 01-28-2007, 07:48 PM   #1
poe
Confirmed User
 
Join Date: Mar 2004
Posts: 455
htaccess rewrite question..

i have a site with a bunch of php files like this:

http://www.site.com/cookies.php
http://www.site.com/milk.php

is it possible to make a rewrite so the links would look like this?

http://www.site.com/cookies
http://www.site.com/milk

thanks a bunch
__________________
poe is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-28-2007, 08:46 PM   #2
SmokeyTheBear
►SouthOfHeaven
 
SmokeyTheBear's Avatar
 
Join Date: Jun 2004
Location: PlanetEarth MyBoardRank: GerbilMaster My-Penis-Size: extralarge MyWeapon: Computer
Posts: 28,609
http://www.sitepoint.com/article/sea...riendly-urls/3
__________________
hatisblack at yahoo.com
SmokeyTheBear is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-28-2007, 08:54 PM   #3
Bro Media - BANNED FOR LIFE
MOBILE PORN: IMOBILEPORN
 
Join Date: Jan 2004
Location: Tinseltown NL
Posts: 16,502
RewriteRule ^/([^/]+)*$ $1.php

that should work, but don't make any .php files that have folders with the same name or it will fuck with it
Bro Media - BANNED FOR LIFE is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-28-2007, 09:22 PM   #4
poe
Confirmed User
 
Join Date: Mar 2004
Posts: 455
hmm, thanks for the help guys.

somehow i can't get it to work.

should my htaccess file have more than this:

RewriteEngine on
RewriteRule ^/([^/]+)*$ $1.php

?
__________________
poe is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-28-2007, 10:05 PM   #5
Bro Media - BANNED FOR LIFE
MOBILE PORN: IMOBILEPORN
 
Join Date: Jan 2004
Location: Tinseltown NL
Posts: 16,502
Quote:
Originally Posted by poe View Post
hmm, thanks for the help guys.

somehow i can't get it to work.

should my htaccess file have more than this:

RewriteEngine on
RewriteRule ^/([^/]+)*$ $1.php

?
yes

8chars....
Bro Media - BANNED FOR LIFE is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-28-2007, 10:13 PM   #6
poe
Confirmed User
 
Join Date: Mar 2004
Posts: 455
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ $1.php [L,QSA]

that worked. thanks!
__________________
poe is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.