Need help with specific mod_rewrite SEO friendly URL

Discussion in 'Apache' started by Alicia.Stampolitis, Apr 1, 2009.

Thread Status:
Not open for further replies.
  1. #1
    I'm newbie with mod rewrite and needing to have a SEO friendly URL but I haven't found how to make long dynamic URLs nicer.

    so far tried these and none is working:

    
    Options +FollowSymLinks 
    RewriteEngine On
    RewriteRule ^concepts  index.php?sitesig=PT&page=PT_003_Basic_Concepts
    
    Code (markup):
    
    Options +FollowSymLinks 
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?page=$1 [L]
    
    Code (markup):
    
    Options +FollowSymLinks
    RewriteEngine On
    RewriteBase /
    RewriteCond %{HTTP_HOST} !^www\.[a-z-]+\.[a-z]{2,6} [NC]
    RewriteCond %{HTTP_HOST} ([a-z-]+\.[a-z]{2,6})$     [NC]
    RewriteRule ^/(.*)$ http://%1/$1 [R=301,L]
    
    Code (markup):
    Sometime adding -Multiviews this way
    Options +FollowSymLinks -MultiViews

    Some others this line belows RewriteEngine On:
    RewriteBase /


    could someone gimme the hint to make of the following a NICE url?


    first level of my navigation menu is like this:

    http://mysite/index.php?sitesig=DEFAULT&page=DEFAULT_003_Basic_Concepts


    second level navigation adds this:

    http://mysite/index.php?sitesig=DEFAULT&page=DEFAULT_003_Basic_Concepts&subpage=DEFAULT_010_Content_Snippets

    script is already coded with that long structure so I need a way to rewrite those ugly urls.

    thanks a tone for helping
     
    Alicia.Stampolitis, Apr 1, 2009 IP
Thread Status:
Not open for further replies.