Форумы / Cotonti / Support / I need help with mod_rewrite

mod_rewrite for dummies

GHengeveld
#27999 19.01.2011 01:40
I can help you, but first you should decide on what you want the URLs to look like in the end. This is crucial for SEO, and changing it afterwards is not really an options (SEO-wise but also because of dead links). Things to think of:

- Do you want to use 'subfolders', so the path to a file in the CMS is also the path in the URL? This complicates things a lot but looks much better.
- Do you have other site areas to rewrite, such as forums?
- File extension (.html seems to be best for SEO, but no extension at all looks better)

I think it's a good idea to develop a SEO-friendly and cross-site implementation here, so we can put it in documentation, or even provide it with Cotonti by default.

Here's an example:
/path/to/somefolder => list.php?c=somefolder
/somefolder => list.php?c=somefolder
/path/to/somepage.html => page.php?al=somepage
/somepage.html => page.php?al=somepage
/path/to/someID.html => page.php?id=someID
/someID.html => page.php?id=someID
/forums/somesection/sometopictitle.html => forums.php?m=posts&q=sometopicID
/path/to/somefolder.rss => rss.php?c=somefolder
Отредактировано: Koradhil (19.01.2011 01:50, 14 лет назад)