Linuxdelta
September 06, 2010, 10:51:15 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Willkommen im neuen Forum
 
   Home   Help Search Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: Pagealiases  (Read 954 times)
shelluk
User
*
Offline Offline

Posts: 6


View Profile
« 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:
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 Sad

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
Logged
admin
Administrator
User
*****
Offline Offline

Posts: 406


View Profile WWW
« 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
Logged
shelluk
User
*
Offline Offline

Posts: 6


View Profile
« 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:
[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:
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:
AccessFileName .htaccess

Thanks,
Shell
Logged
admin
Administrator
User
*****
Offline Offline

Posts: 406


View Profile WWW
« 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
Logged
shelluk
User
*
Offline Offline

Posts: 6


View Profile
« 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
Logged
admin
Administrator
User
*****
Offline Offline

Posts: 406


View Profile WWW
« 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>
Logged
shelluk
User
*
Offline Offline

Posts: 6


View Profile
« 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
Logged
admin
Administrator
User
*****
Offline Offline

Posts: 406


View Profile WWW
« Reply #7 on: December 15, 2009, 01:04:14 PM »

ok. no problem Wink
Logged
shelluk
User
*
Offline Offline

Posts: 6


View Profile
« 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 Sad

Thanks
Shell
Logged
shelluk
User
*
Offline Offline

Posts: 6


View Profile
« Reply #9 on: January 16, 2010, 11:50:44 PM »

GOT IT! Cheesy

Needed to add this to the .htaccess file in the Knowledgebase directory:
Code:
RewriteBase /~shell/kb

Thanks for your help
Shell
Logged
admin
Administrator
User
*****
Offline Offline

Posts: 406


View Profile WWW
« Reply #10 on: January 17, 2010, 09:48:40 PM »

Thanks for the info and the feedback Smiley

regards,
Frank
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!