Welcome to WebmasterWorld Guest from 54.144.107.83

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

Rewrite 2 pages Rule Condition

Condition for 2 pages

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

New User

5+ Year Member

joined:Dec 31, 2006
posts:23
votes: 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...

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

Full Member

10+ Year Member

joined:Jan 4, 2006
posts:307
votes: 0


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

Milan

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

Senior Member

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

joined:July 3, 2002
posts:18903
votes: 0


This question comes up almost daily now.

Check the threads over the last few weeks.

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

New User

5+ Year Member

joined:Dec 31, 2006
posts:23
votes: 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

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

Full Member

10+ Year Member

joined:Jan 4, 2006
posts:307
votes: 0


[webmasterworld.com...]

Milan

 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members