Welcome to Geeklog, Anonymous Sunday, December 22 2024 @ 05:17 pm EST

Geeklog Forums

How to get mod_rewrite to work?


Status: offline

JoelF

Forum User
Chatty
Registered: 07/18/04
Posts: 39
curious
I've got the mod_rewrite flag set to true in config.php

$_CONF['url_rewrite'] = true; // false = off, true = on
, but when I look at URL's for static pages they do not appear to be rewritten. I 'think' that I've got apache set up with mod_rewrite loading (httpd.conf has LoadModule rewrite_module modules/mod_rewrite.so uncommented). Is there something else to getting this working? Apologies in advance if this is really an apache question - I haven't worked with mod_rewrite yet and figured "it's time"!

BTW this is apache2 on Win XP if that makes a difference.

Thanks,

Joel
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Quote by JoelF: I've got the mod_rewrite flag set to true in config.php

$_CONF['url_rewrite'] = true; // false = off, true = on
, but when I look at URL's for static pages they do not appear to be rewritten. I 'think' that I've got apache set up with mod_rewrite loading

Geeklog's rewriting has nothing to do with mod_rewrite, it's all done internally.

Currently, only the links to the full article (i.e. article.php) and links to static pages are rewritten.

bye, Dirk
 Quote

Status: offline

JoelF

Forum User
Chatty
Registered: 07/18/04
Posts: 39
If I have already created the static pages will the URL's get rewritten, or is this only for pages created after setting it to true? (I'm guessing the latter...)

Thanks,

Joel
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Quote by JoelF: If I have already created the static pages will the URL's get rewritten

Yes, it will apply to all existing static pages (only for links that are created dynamically, of course, like those in the menu or in search results).

The old (non-rewritten) URLs still work, so it's not a problem if you have some of those hard-coded somewhere (or pointing to your site from other sites, e.g. Google).

bye, Dirk
 Quote

Status: offline

JoelF

Forum User
Chatty
Registered: 07/18/04
Posts: 39
Oh now I get it. Thanks. I've reset the URL's in lib_custom and header.thtml and all is working with rewritten URL's.

Have you ever used the apache-level mod_rewrite? My understanding (theoretical since I haven't set this up from scratch yet) is that with the right setup it could dynamically remap the URL's of everything - is that your understanding?

If you think this is what it might do I'll take a look to see if I can figure it out (can't guarantee quickly but I will investigate it).

Thanks,

Joel
 Quote

All times are EST. The time is now 05:17 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content