Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Coding Forum


You are currently viewing our Coding Forum as a guest. Please register to participate.
Login



Reply
Mod_Rewrite (or maybe redirecting)...puzzled!
Old 02-20-2007, 11:27 AM Mod_Rewrite (or maybe redirecting)...puzzled!
Marc Timberlake's Avatar
Ultra Talker

Posts: 300
Trades: 0
Hi,

I've recently moved from Perl to PHP pages on my Short Story site, but there's still a fair amount of traffic trying to access the Perl pages, which now don't exist. The only difference between the url's is the file extension in all cases.

Here's an example:

The original page was /story.pl?s=756
New page is /story.php?s=756

The only difference is the file extension in all cases.
Is there any simple way to use Mod_Rewrite etc to redirect anyone trying to access the Perl pages to the equivalent PHP page?

Cheers!

(EDIT: I've tried a few different ways within .htaccess, but just can't seem to get it right...)
__________________


Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE

Last edited by Marc Timberlake; 02-20-2007 at 11:29 AM..
Marc Timberlake is offline
Reply With Quote
View Public Profile Visit Marc Timberlake's homepage!
 
 
Register now for full access!
Old 02-20-2007, 05:02 PM Re: Mod_Rewrite (or maybe redirecting)...puzzled!
Learning Newbie's Avatar
Defies a Status

Latest Blog Post:
Astounding Republican Paranoia
Posts: 5,662
Name: John Alexander
Trades: 0
Yes. I don't have the exact link offhand, but if you search around you can find it.

Basically you want to make a rule that catches *.pl and replaces it with *.php - you can have query strings after this.
Learning Newbie is offline
Reply With Quote
View Public Profile
 
Old 03-03-2007, 06:32 AM Re: Mod_Rewrite (or maybe redirecting)...puzzled!
pitbull82's Avatar
Super Talker

Posts: 147
Name: Marcin Nabiałek
Location: Poland, Częstochowa
Trades: 0
If I want to have the same urls but they should by parsed by PHP, I can simple add in htaccess:

Code:
AddType application/x-httpd-php .pl
You create on the server files with pl extensions but they will be parsed by PHP.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
pitbull82 is offline
Reply With Quote
View Public Profile Visit pitbull82's homepage!
 
Old 03-03-2007, 05:30 PM Re: Mod_Rewrite (or maybe redirecting)...puzzled!
sigmahotels's Avatar
Ultra Talker

Posts: 255
Name: Mark
Trades: 0
another mod rewite question, does anyone have the correct .htacces file mod_rewite code for mambo SEF URLs, I am really struggling on particular host and they can't do it either
__________________

Please login or register to view this content. Registration is FREE
We search for you

Please login or register to view this content. Registration is FREE
sigmahotels is offline
Reply With Quote
View Public Profile Visit sigmahotels's homepage!
 
Reply     « Reply to Mod_Rewrite (or maybe redirecting)...puzzled!
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 2.74742 seconds with 12 queries