Web Design Forum  
 
Go Back   Web Design Forum > Web Software > Scripts

Reply
 
LinkBack Thread Tools Display Modes
Old 08-31-2011, 05:08 PM   #1
New Member
 
Join Date: Aug 2011
Posts: 1
Default .htaccess hiding .php

Basically I want the user to type in the following:

http://mysite.com/page/variable1/variable2

and the server to see

http://mysite.com/page.php/variable1/variable2

I know there is a way to make the variables into ?var=1var=2 however I have a php script that is implementing that functionality to better control the conversion.

any help would be appreciated.

Last edited by kfried; 08-31-2011 at 05:08 PM. Reason: disable links
kfried is offline   Reply With Quote


Old 11-04-2011, 12:51 PM   #2
Silver Member
 
Join Date: Aug 2011
Posts: 100
Default

You could have something like:

Code:
#RewriteRule ^([A-Za-z0-9-]+)/([A-Za-z0-9-/]+)$ $1.php/$2 [L]
I haven't tested it but if that doesn't work it won't be far out.
__________________
Mark R

Wubbleyou - Web Design Newcastle
A professional web design agency based in Newcastle upon Tyne servicing clients based throughout the U.K.

Home spray tan machine - Landlord Reviews
MarkR is offline   Reply With Quote
Reply

Tags
htaccess, mod_rewrite, php, url, url handling

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 04:17 PM.


Camera Forum - Computer Forum - Web Design Forum

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Content Relevant URLs by vBSEO 3.6.0 ©2011, Crawlability, Inc.