homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

rewrite only partially working

Msg#: 4530260 posted 8:35 pm on Dec 21, 2012 (gmt 0)

I have the following rewrite rules:

RewriteRule ^([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)/(.*)$ page3.php?var1=$1&var2=$2&var3=$3
RewriteRule ^([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)$ page2.php?var1=$1&var2=$2
RewriteRule ^([a-zA-Z0-9_-]+)$ page1.php?var1=$1

This part is working fine:
==> goes to page1.php

==> goes to page2.php

==> goes to page3.php

So far so good, but:
==> page not found error

==> goes to page3.php not to page2.php?

==> goes to page3.php

I would like
www.mysite.com/aaa/ to be rewritten as www.mysite.com/aaa
www.mysite.com/aaa/bbb/ to be rewritten as www.mysite.com/aaa/bbb
www.mysite.com/aaa/bbb/ccc/ to be rewritten as www.mysite.com/aaa/bbb/ccc

But How?
Any help is appreciated;-)



Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved