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
how is this done? (.htaccess - file help)
Old 08-28-2006, 06:40 AM how is this done? (.htaccess - file help)
Junior Talker

Posts: 1
Name: Mads Andersen
Trades: 0
Hi I'm running Apache and PHP4 on a localhost.

Now my problem is that I want PHP to get a hold of variables through the URL string - so that http://localhost/webiste/web/ is my directory for the website,
but when writing http://localhost/webiste/web/pagenumber/menuid/

then I want to access the last two "pagenumer" and "menuid" as $_GET[] VARS in my php script which is based at http://localhost/webiste/web/

I've seen this done at Randers Tegl - Randers Tegl er skandinaviens største tegl-leverandør, med tagsten og mursten til konkurrencedygtige priser. - but anyone knows where I could find info on this or find a tutorial?

I THINK its got something to do with the .htaccess file? - but is this called the same under apache?

Thanks in advance,

Pedellen
Pedellen is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 08-28-2006, 06:57 AM Re: how is this done? (.htaccess - file help)
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
have a read through High Rankings® Search Engine Optimization Forum -> Redirects, 301s, 302, htaccess, mod_rewrite especially the pinned thread.

and .htaccess is only for Apache
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 08-30-2006, 07:15 AM Re: how is this done? (.htaccess - file help)
ibbo's Avatar
Super Spam Talker

Posts: 880
Location: Leeds UK
Trades: 0
You need this

RewriteEngine on
RewriteRule (.*)/(.*)/ ?$1=$2

make sure you save it as .htaccess as htaccess will not be read. Also make sure you put it into the dir of interest and not in your doc root otherwise your css files and any js may not work as planned.

ibbo
__________________

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

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

Linux user #349545 :
(GNU/Linux)iD8DBQBAzWjX+MZAIjBWXGURAmflAKCntuBbuKCWenpm XoA7LNydllVQOwCf

Last edited by ibbo; 08-30-2006 at 07:16 AM..
ibbo is offline
Reply With Quote
View Public Profile Visit ibbo's homepage!
 
Reply     « Reply to how is this done? (.htaccess - file help)
 

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.11851 seconds with 12 queries