Author Topic: Pagealiases  (Read 2236 times)

Offline shelluk

  • User
  • *
  • Posts: 6
    • View Profile
Pagealiases
« on: December 02, 2009, 02:35:29 PM »
Hi Guys,

I've tried following the instructions found here: http://www.knowledgeroot.org/pagealias.html

I have copy and pasted into .htaccess (the Knowledgeroot folder) the following:
Code: [Select]
RewriteEngine On
RewriteRule ^[^/]*\.html$ index.php

Mod_rewrite is enabled in Apache (confirmed by looking at the out put of phpinfo())

Yet it is not working :(

All my links on the left have the address with the pagealias name in it but when you click on them, I just get "The requested URL /home/shell/public_html/kb/index.php was not found on this server."

I can confirm /home/shell/public_html/kb/index.php exists - if I type nano and that path it opens the index.php file for Knowledgeroot!

Thanks for you help
Shell

Offline admin

  • Administrator
  • User
  • *****
  • Posts: 553
    • View Profile
    • http://www.lordlamer.de
Re: Pagealiases
« Reply #1 on: December 02, 2009, 04:07:24 PM »
Hi,

What shows error.log?
What apache version?
Do you have enabled .htacces files in your apache configuration?

regards,
Frank

Offline shelluk

  • User
  • *
  • Posts: 6
    • View Profile
Re: Pagealiases
« Reply #2 on: December 02, 2009, 04:13:49 PM »
Hi,

What shows error.log?
What apache version?
Do you have enabled .htacces files in your apache configuration?

regards,
Frank

Thanks for the quick reply.

Error.log:
Code: [Select]
[Wed Dec 02 15:08:48 2009] [error] [client 195.171.169.42] File does not exist:
/var/www/home, referer: http://www.mydomain.co.uk/~shell/kb/

- Where's it getting /var/www/home from? It's /home/shell/public_html/kb/ as above! :s

Apache version:
Code: [Select]
Apache/2.2.8 (Ubuntu) PHP/5.2.4-2ubuntu5.1 with Suhosin-Patch mod_ssl/2.2.8 OpenSSL/0.9.8g
Enable .htaccess
In what way?
I've found the following in my apache2.conf
Code: [Select]
AccessFileName .htaccess
Thanks,
Shell

Offline admin

  • Administrator
  • User
  • *****
  • Posts: 553
    • View Profile
    • http://www.lordlamer.de
Re: Pagealiases
« Reply #3 on: December 02, 2009, 04:21:08 PM »
hi,

could you give me the exact url in the html source what makes the problem?

/var/www is the default documentroot location.

Try a AllowOverride All in your /etc/apache2/mods-available/userdir.conf

Frank

Offline shelluk

  • User
  • *
  • Posts: 6
    • View Profile
Re: Pagealiases
« Reply #4 on: December 02, 2009, 04:39:55 PM »
Try a AllowOverride All in your /etc/apache2/mods-available/userdir.conf
Done. Same.

could you give me the exact url in the html source what makes the problem?
Sorry, not sure what you mean exactly.

Thanks,
Shell

Offline admin

  • Administrator
  • User
  • *****
  • Posts: 553
    • View Profile
    • http://www.lordlamer.de
Re: Pagealiases
« Reply #5 on: December 02, 2009, 04:48:34 PM »
Hi,

i mean the link that knowledgeroot generated with the static url.
So you should have a link in your tree like that http://www.domain.com/youralias.html or not?

Alternativ you could add something like this to your apache configuration:

<Directory "/path/to/knowledgeroot">
        Options -Indexes +FollowSymlinks +Includes
        DirectoryIndex index.php index.html index.htm

        RewriteEngine On
        RewriteRule ^[^/]*\.html$ index.php
</Directory>

Offline shelluk

  • User
  • *
  • Posts: 6
    • View Profile
Re: Pagealiases
« Reply #6 on: December 15, 2009, 11:24:21 AM »
Apologies, I haven't sorted this yet and haven't had time to try since last posting. Will maybe tonight or other wise hopefully over Christmas!

Thanks for your help
Shell

Offline admin

  • Administrator
  • User
  • *****
  • Posts: 553
    • View Profile
    • http://www.lordlamer.de
Re: Pagealiases
« Reply #7 on: December 15, 2009, 01:04:14 PM »
ok. no problem ;)

Offline shelluk

  • User
  • *
  • Posts: 6
    • View Profile
Re: Pagealiases
« Reply #8 on: January 16, 2010, 11:18:06 PM »
Hi,

Finally got around to looking at this again.

Tried what you said, same still though. "File does not exist: /var/www/home" in my apache error log. No idea why it's looking there?! It's in /home/shell/public_html/kb/ and that's the path I put in your code above :(

Thanks
Shell

Offline shelluk

  • User
  • *
  • Posts: 6
    • View Profile
Re: Pagealiases
« Reply #9 on: January 16, 2010, 11:50:44 PM »
GOT IT! :D

Needed to add this to the .htaccess file in the Knowledgebase directory:
Code: [Select]
RewriteBase /~shell/kb
Thanks for your help
Shell

Offline admin

  • Administrator
  • User
  • *****
  • Posts: 553
    • View Profile
    • http://www.lordlamer.de
Re: Pagealiases
« Reply #10 on: January 17, 2010, 09:48:40 PM »
Thanks for the info and the feedback :)

regards,
Frank