Welcome to WebmasterWorld Guest from 107.20.110.201

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

Rewrite 2 pages Rule Condition

Condition for 2 pages

     

jakomo

7:56 pm on Aug 3, 2007 (gmt 0)

5+ Year Member



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

9:24 am on Aug 4, 2007 (gmt 0)

5+ Year Member



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

Milan

g1smd

1:04 am on Aug 5, 2007 (gmt 0)

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



This question comes up almost daily now.

Check the threads over the last few weeks.

jakomo

4:32 pm on Aug 5, 2007 (gmt 0)

5+ Year Member



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

6:41 pm on Aug 5, 2007 (gmt 0)

5+ Year Member



[webmasterworld.com...]

Milan

 

Featured Threads

Hot Threads This Week

Hot Threads This Month