homepage Welcome to WebmasterWorld Guest from 23.23.8.131
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

    
Rewrite 2 pages Rule Condition
Condition for 2 pages
jakomo

5+ Year Member



 
Msg#: 3413094 posted 7:56 pm on Aug 3, 2007 (gmt 0)

Hello,

Maybe this is not possible or maybe this is very basic.. Well I want to do that:

I have two dynamic pages index.php show the main categories and pages.php show the page content. (same.. root)

I want to do something like that, and of course it is not running.. (when condition is from index.php display index.php page)

RewriteCond %{QUERY_STRING} &?main_tab=([^&]+)
RewriteRule ^(.+).html$ /index.php?main_tab=$1

RewriteCond %{QUERY_STRING} &?pages=([^&]+)
RewriteRule ^(.+).html$ /pages.php?article=$1

for example
in index.php?main_tab=bags I want to see something like this:
mysite.com/bags.html

in RewriteRule ^(.+).html$ /pages.php?article=leather-bags
I want to see something like this:
mysite.com/leather-bags.html

Of course these rules should be in the same htaccess.

Thanks very much for the help...

 

milanmk

5+ Year Member



 
Msg#: 3413094 posted 9:24 am on Aug 4, 2007 (gmt 0)

There is an excellent post by Jim called Changing Dynamic URLs to Static URLs [webmasterworld.com] that will help you out.

Milan

g1smd

WebmasterWorld Senior Member g1smd us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 3413094 posted 1:04 am on Aug 5, 2007 (gmt 0)

This question comes up almost daily now.

Check the threads over the last few weeks.

jakomo

5+ Year Member



 
Msg#: 3413094 posted 4:32 pm on Aug 5, 2007 (gmt 0)

Hello,

Really I did not find out information about it on the forum... Please can you tell me where is post?

thanks very much

milanmk

5+ Year Member



 
Msg#: 3413094 posted 6:41 pm on Aug 5, 2007 (gmt 0)

[webmasterworld.com...]

Milan

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