search engine friendly URLs
Status: Inactive
Brought to you by:
markwallis
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.
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
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
Logged In: YES
user_id=342445
Initial commit by iamdecal with apache-rewrite style SEO. Currently still
investigating options for 1.2 release.