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
Old 12-19-2006, 09:58 PM Url rewriting help
Extreme Talker

Posts: 217
Trades: 0
I FINALLY figured out how to get mod_rewrite to work.

Its all working fine and dandy, I just have 2 problems

1)How do you grab the url /directory? I have to specify my exact domain and directory in order to get things to work. That would be fine except for the fact that I am planning on having the app im creating be on multiple websites by different users.

2)Im having trouble redirecting and index.php?x=y url to the /x/y kind of url that I want it to be. It works fine if you type in /x/y, but if you type in index.php?x=y it wont redirect.

Heres my code in the .htaccess file
Code:
RewriteEngine On

RewriteRule ^channels/([0-9]+\.[0-9]+)$ http://helmgames.com/test/index.php?channel=$1 

RewriteRule ^threads/([0-9]+)$ http://helmgames.com/test/index.php?topic=$1 
//my redirect rules are below

RewriteRule ^index\.php?channel=([0-9]+\.[0-9]+)$  channels/$1 [R]

RewriteRule ^index\.php?topic=([0-9]+)$  threads/$1 [R]
__________________

Please login or register to view this content. Registration is FREE
Slick Nick is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Reply     « Reply to Url rewriting 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.17116 seconds with 12 queries