Jump to content


SEF Url's using Mod rewrite on .htaccess

  • Please log in to reply
1 reply to this topic

#1 72dpi

  • Members
  • Pip
  • Newbie
  • 4 posts

Posted 14 March 2006 - 02:04 AM

Hi All,
I am trying to do simple Search Engine Friendly URLS using Mod Reqwrite.
In my .htaccess file I currently have:
Options +FollowSymLinks
RewriteEngine on
RewriteRule index/(.*)/(.*)/(.*)/(.*)/(.*)/(.*)/$ /index.php?$1=$2&$3=$4&$5=$6

My a href is: [a href=\"http://www.mysite.com/index/page/a\" target=\"_blank\"]http://www.mysite.com/index/page/a[/a]

Index.php is the page, and my switch content is defined as:
switch ($page) {
case 'a':
   echo "page 1";
case 'b':
   echo "page 3";
case 'c':
   echo "page 4";
   echo "default";

Where Page is the "switch" variable, and a is the "case" I want to show

This is not working for me.

My link would usually be: index.php?page=a
I also want to be able to do main.php?page=a&menu=1

Does anyone have a good example of how to get this to work?.
Every example I have found on the web has not helped me.

Any pointers would be awesome!
[a href="http://www.72dpi.net.au" target="_blank"]72dpi[/a]

#2 keeB

  • Staff Alumni
  • Advanced Member
  • 1,078 posts
  • LocationCalifornia

Posted 14 March 2006 - 08:17 AM

    switch ($_GET['page']){
        case 'a':
            print "page a";

works [=

Come visit my site to see my latest projects

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users