Menu

#28 search engine friendly URLs

Next_Minor_Release
open
nobody
5
2009-07-14
2005-10-07
iamdecal
No

if you using apache, it would be nice to take advantage
of mod_rewrite,

im currently mapping a url like this,

/comoblog/123/this_is_the_title
i.e
/<url>/<post_id>/<post_mail_subject>

to comoblog/post.php/123

once Ive confirmed the urls all work with release 1.0,
ill submit the code.

Discussion

  • Mark Wallis (aka serialmonkey)

    • labels: --> Application Improvements
    • milestone: --> 522361
     
  • Mark Wallis (aka serialmonkey)

    • milestone: 522361 --> Next_Minor_Release
    • assigned_to: nobody --> iamdecal
     
  • Mark Wallis (aka serialmonkey)

    Logged In: YES
    user_id=342445

    Again, if this can be done without DB changes then we should do it in 1.1

    Otherwise it can wait until 2.0

     
  • iamdecal

    iamdecal - 2005-11-28

    Logged In: YES
    user_id=1126528

    had some more thoughts on this and although its easy to do
    on apache, i have no idea how to go about it on IIS.

    to start it off, you need to add this to .httaccess

    # Various rewrite rules.
    <IfModule mod_rewrite.c>
    RewriteEngine on

    # Modify the RewriteBase if you are using Drupal in a
    subdirectory and

    # Rewrite current-style URLs of the form 'index.php?q=x'.
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^/post/(.*)$ /comoblog/topic.php?$1 [L,QSA]
    RewriteRule ^/topic/(.*)$ /comoblog/topic.php?$1 [L,QSA]
    </IfModule>

    of course to get any benifit you also need to modify the
    templates to out put the links in the correct format.

    which is the tricky bit, i guess a simple flag in admin
    will turn it on or off, but some of the modules may also
    need to be aware of it as well.

    i'll give it some more thought though

     
  • Mark Wallis (aka serialmonkey)

    Logged In: YES
    user_id=342445

    Initial commit by iamdecal with apache-rewrite style SEO. Currently still
    investigating options for 1.2 release.

     
  • Mark Wallis (aka serialmonkey)

    • assigned_to: iamdecal --> nobody
     

Log in to post a comment.

MongoDB Logo MongoDB