REGISTER
|
Search Tycoon Talk
|
Freelancer.com
|
Members
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.
Register Here
Forum Rules
Website and Server Administration Forum
You are currently viewing our Website and Server Administration Forum as a guest. Please
register
to participate.
Login
Remember Me?
Login via Freelancer.com
Tycoon Talk
>
Web Administration Support
>
Website and Server Administration Forum
>
Help with ReWrite rules
Link Back
Thread Tools
Search this Thread
Help with ReWrite rules
05-15-2009, 04:09 AM
#
1
(
permalink
)
Help with ReWrite rules
bmp99
Skilled Talker
Posts: 55
Name: Brian
Trades:
0
Talkupation:
Hello,
Im having some issues with rewrite rules, possibly someone has some suggestions:
RewriteRule ^gps/(.*)/$ gps/index.php?category=$1
that is my rewrite rule, and it works great if I do:
http://www.transeca.com/gps/category/
but I want to go one level deeper:
http://www.transeca.com/gps/category/product/
so I change the rewrite rule to:
RewriteRule ^gps/(.*)/(.*)/$ gps/index.php?category=$1&product=$2
now I can goto:
http://www.transeca.com/gps/category/product/
but I can no longer goto just:
http://www.transeca.com/gps/category/
I get:
Not Found
The requested URL /gps/category/ was not found on this server.
Anyone know how to over come this hurdle? Do I need to use some kind of conditional statement, or 2 separate rules?
Register
now for full access!
05-15-2009, 06:55 AM
#
2
(
permalink
)
Re: Help with ReWrite rules
bmp99
Skilled Talker
Posts: 55
Name: Brian
Trades:
0
Talkupation:
this was solved by adding an additional rule:
RewriteRule ^gps/(.*)/$ gps/index.php?category=$1
RewriteRule ^gps/(.*)/(.*)/$ gps/index.php?category=$1&product=$2
However, now when I goto:
http://www.transeca.com/gps/category/product/
category ($1) is showing as index.php
product ($2) shows correctly as product (or whatever was n the URL)
any ideas?
05-15-2009, 07:16 AM
#
3
(
permalink
)
Re: Help with ReWrite rules
bmp99
Skilled Talker
Posts: 55
Name: Brian
Trades:
0
Talkupation:
ahh-
that was fixed by changing the rule to:
RewriteRule ^gps/(.*)/$(.*)/$ gps/index.php?category=$1&product=$2
i guess im finished ranting now
« Reply to
Help with ReWrite rules
Previous Thread
|
Next Thread
Tycoon Talk
>
Web Administration Support
>
Website and Server Administration Forum
>
Help with ReWrite rules
Thread Tools
Search this Thread
Show Printable Version
Email this Page
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
Forum Rules
Feeds:
RSS
JS
XML
Feeds for this forum:
RSS
JS
XML
LinkBack
LinkBack URL
About LinkBacks
Bookmark & Share
Digg this Thread!
Add Thread to del.icio.us
Bookmark in Technorati
Tweet this thread
Page generated in
0.18304
seconds with
12
queries