URL rewriting problem
Posted: Sun Dec 07, 2008 11:16 am
Hello everyone, this is my first post here, but it won't be the last, for sure. Here's my problem...
I have a Serendipity blog hosted in a subfolder of my hosting account, called - how else - "Serendipity." I didn't install in the root folder because I am hosting multiple sites there, and I wouldn't like to see more folders than I should in the root, and the .htaccess in the root looks like this:
So far, so good - once you go to www.nistorcodrut.com or nistorcodrut.com, you get the home page of the Serendipity blog. The problems is that, once you click to read some article, you get a link like www.nistorcodrut.com/Serendipity/title, and what I would like is to get www.nistorcodrut.com/title. Below, you have the .htaccess generated by Serendipity, after messing a little with the URL rewrite rules:
Bonus question: as things are looking now, if you click to see the next page of entries on the main page of the blog, you get an error, but if you browse the archive, you can go back and forth through the pages. What's wrong with that one?
Roundup - what I would like is to have all the www.nistorcodrut.com/Serendipity/some-title links turn into www.nistorcodrut.com/some-title, and if that can be done without messing too much with what Google sees, that would be great. After all, there are only a few indexed pages, and this is not a commercial blog, so it's no tragedy not to have it indexed right, at least for now.
Thanks in advance!
I have a Serendipity blog hosted in a subfolder of my hosting account, called - how else - "Serendipity." I didn't install in the root folder because I am hosting multiple sites there, and I wouldn't like to see more folders than I should in the root, and the .htaccess in the root looks like this:
Code: Select all
RewriteEngine On
RewriteOptions MaxRedirects=1
RewriteCond %{HTTP_HOST} ^nistorcodrut\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.nistorcodrut\.com$
RewriteCond %{REQUEST_URI} !^/Serendipity/(.*)
RewriteRule (.*) /Serendipity/$1Code: Select all
# BEGIN s9y
ErrorDocument 404 /Serendipity/index.php
DirectoryIndex /Serendipity/index.php
RewriteEngine On
RewriteRule ^(([0-9a-z\.\_!;,\+\-\%]+\.html)/?) index.php?/$1 [NC,L,QSA]
RewriteRule ^(authors/([0-9]+)-[0-9a-z\.\_!;,\+\-\%]+) index.php?/$1 [NC,L,QSA]
RewriteRule ^(feeds/categories/([0-9;]+)-[0-9a-z\.\_!;,\+\-\%]+\.rss) index.php?/$1 [NC,L,QSA]
RewriteRule ^(feeds/authors/([0-9]+)-[0-9a-z\.\_!;,\+\-\%]+\.rss) index.php?/$1 [NC,L,QSA]
RewriteRule ^(categories/[0-9a-z\.\_!;,\+\-\%]+) index.php?/$1 [NC,L,QSA]
RewriteRule ^archives([/A-Za-z0-9]+)\.html index.php?url=/archives/$1.html [NC,L,QSA]
RewriteRule ^([0-9]+)[_\-][0-9a-z_\-]*\.html index.php?url=$1-article.html [L,NC,QSA]
RewriteRule ^feeds/(.*) index.php?url=/feeds/$1 [L,QSA]
RewriteRule ^unsubscribe/(.*)/([0-9]+) index.php?url=/unsubscribe/$1/$2 [L,QSA]
RewriteRule ^approve/(.*)/(.*)/([0-9]+) index.php?url=approve/$1/$2/$3 [L,QSA]
RewriteRule ^delete/(.*)/(.*)/([0-9]+) index.php?url=delete/$1/$2/$3 [L,QSA]
RewriteRule ^(admin|entries)(/.+)? index.php?url=admin/ [L,QSA]
RewriteRule ^archive/? index.php?url=/archive [L,QSA]
RewriteRule ^(index|atom[0-9]*|rss|b2rss|b2rdf).(rss|rdf|rss2|xml) rss.php?file=$1&ext=$2
RewriteRule ^(plugin|plugin)/(.*) index.php?url=$1/$2 [L,QSA]
RewriteRule ^search/(.*) index.php?url=/search/$1 [L,QSA]
RewriteRule ^comments/(.*) index.php?url=/comments/$1 [L,QSA]
RewriteRule ^(serendipity\.css|serendipity_admin\.css) index.php?url=/$1 [L,QSA]
RewriteRule ^index\.(html?|php.+) index.php?url=index.html [L,QSA]
RewriteRule ^htmlarea/(.*) htmlarea/$1 [L,QSA]
RewriteRule (.*\.html?) index.php?url=/$1 [L,QSA]
<Files *.tpl.php>
deny from all
</Files>
<Files *.tpl>
deny from all
</Files>
<Files *.sql>
deny from all
</Files>
<Files *.inc.php>
deny from all
</Files>
<Files *.db>
deny from all
</Files>
# END s9y Roundup - what I would like is to have all the www.nistorcodrut.com/Serendipity/some-title links turn into www.nistorcodrut.com/some-title, and if that can be done without messing too much with what Google sees, that would be great. After all, there are only a few indexed pages, and this is not a commercial blog, so it's no tragedy not to have it indexed right, at least for now.
Thanks in advance!