Reply
Help Needed Creating Virtual Folders and Subfolders
Old 07-21-2008, 08:50 AM Help Needed Creating Virtual Folders and Subfolders
Junior Talker

Posts: 1
Trades: 0
hi. I am new to htaccess and need help to create something like this:

if i go to mydomain.com/category1 i must get opened mydomain.com/categories.php?cat=category1

if i go to mydomain.com/category1/02 i must get opened mydomain.com/categories.php?cat=category1?page=result2

Can you help me please?
insecten is offline
Reply With Quote
View Public Profile
 
 
When You Register, These Ads Go Away!
Old 07-21-2008, 03:02 PM Re: Help Needed Creating Virtual Folders and Subfolders
luxury-furnitur's Avatar
Average Talker

Posts: 21
Name: matteo raggi
Location: italy
Trades: 0
why don't use permalinks of wordpress? it is human and easy!
__________________
luxury furniture
luxury-furnitur is offline
Reply With Quote
View Public Profile
 
Old 07-29-2008, 04:11 AM Re: Help Needed Creating Virtual Folders and Subfolders
Skilled Talker

Posts: 72
Name: Larry K
Trades: 0
I think we could handle this in htaccess thusly:

Code:
Redirect /category1 http://mydomain.com/categories.php?cat=category1
Redirect /category1/02 http://mydomain.com/categories.php?cat=category1?page=result2
I inserted this code into my root .htaccess. When I visited mysite/category1 I was sent to a 404 that told me that /categories.php?cat=category1 could not be found on my server. Instead of the 404, of course, your categories.php would handle the request.

Therefore, the Redirect works.

Last edited by L a r r y; 07-29-2008 at 04:17 AM.. Reason: Rephrased the bit about the 404
L a r r y is offline
Reply With Quote
View Public Profile Visit L a r r y's homepage!
 
Reply     « Reply to Help Needed Creating Virtual Folders and Subfolders
 

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 0.09415 seconds with 13 queries