Results 1 to 12 of 12
  1. #1
    Join Date
    Mar 2010
    Posts
    55

    Need assistance on .htaccess

    i'am newbie got small vps with kloxo/centos 5
    i could manage everythngs without big problems
    but now i'am stuck on .htaccess well here is prob, i setup my root website to point to /public_html/app/webroot/
    i downloaded my website but only the first page appear if i click on other link subfoldeds it gives me 404 error
    the LoadModule rewrite_module modules/mod_rewrite.so load by default on apache server so i'didnt need to ajust that
    i'am wondering if i need to change something on /etc/lighttpd/conf/kloxo/mydomain.com vhost
    also in shared host my website used to work well? is there special config that shared host use in ther conf? my .htaccess look like this:
    <IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteRule ^$ webroot/ [L]
    RewriteRule (.*) webroot/$1 [L]
    </IfModule>

    thank's any help would be welcome

  2. #2
    Join Date
    May 2010
    Posts
    57
    Well, you are using kloxo so your website path should be like /home/user/public_html also you need to change path in .htaccess as fallow

    <IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteRule ^$ home/username(change it with actual username)/public_html/ [L]
    RewriteRule (.*) home/username(change it with actual username)/public_html/$1 [L]
    </IfModule>

  3. #3
    Join Date
    Jul 2008
    Posts
    456
    did you move your website from another host? If so you probably need to check the file paths in the site links. You might find they have a full path for the old server rather than using virtual links which will work anywhere.

    Look at a link on the site to another page - if you see "/home/public_html" type link then you either need to recreate the same path or re-code all your site links.

    If you see "page.html" or ../blah/page.html" then something else is creating an issue.

    If you care to share or PM the website URL it would help us figure out what's going on.

  4. #4
    Join Date
    Mar 2010
    Posts
    55
    Quote Originally Posted by gogadget View Post
    did you move your website from another host? If so you probably need to check the file paths in the site links. You might find they have a full path for the old server rather than using virtual links which will work anywhere.

    Look at a link on the site to another page - if you see "/home/public_html" type link then you either need to recreate the same path or re-code all your site links.

    If you see "page.html" or ../blah/page.html" then something else is creating an issue.

    If you care to share or PM the website URL it would help us figure out what's going on.
    it's fresh install of my website nut in shared hots used to work
    their document root is home/user/public_html
    so had to ajust .htaccess in public_html folder
    <IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteBase /app/
    RewriteRule ^$ webroot/ [L]
    RewriteRule (.*) webroot/$1 [L]
    </IfModule>

    with my vps i ponted the document root to

    home/user/public_html/app/webroot

    and put .htaccess into app folder

    <IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteRule ^$ webroot/ [L]
    RewriteRule (.*) webroot/$1 [L]
    </IfModule>


    with propostion above i still get 404 error

    thanks a lot guys for ur help

  5. #5
    Join Date
    Jul 2008
    Posts
    456
    I checked out the OP's system and he has a bit of work to do.

    He's using a CAKE php script but hadn't installed CAKE on the server or edited the index.php file to add the paths in yet.

    I edited the index.php and gave him a how to website for installing Cake.

    Let us know how it turns out.

  6. #6
    Join Date
    Mar 2010
    Posts
    55
    Quote Originally Posted by gogadget View Post
    I checked out the OP's system and he has a bit of work to do.

    He's using a CAKE php script but hadn't installed CAKE on the server or edited the index.php file to add the paths in yet.

    I edited the index.php and gave him a how to website for installing Cake.

    Let us know how it turns out.
    thank you i'am trying to do fresh install and ill add your modified index.php
    and ill let you know how it truns out

    thank's

  7. #7
    Join Date
    Jul 2008
    Posts
    456
    The file path to cake needs to be fixed to match your setup and if you change your webroot the other paths will be too.

    I'm not a big fan of cake based apps - the php configuration is a mess.

    Be sure to read the section on configuring httpd.conf - you need the re-write engine included and so on.

  8. #8
    Join Date
    Mar 2010
    Posts
    55
    i noticed that the problem was the .htaccess not being read in my folders
    it's nothing to do with the website.. a edit the httpd.conf to be AllowOverride All , also AccessFileName .htaccess,LoadModule rewrite_module modules/mod_rewrite.so
    my httpd.conf is on /usr/local/lxlabs/kloxo/file/centos-5/httpd.conf
    and i restarted the webserver ,, but still nothing my .htaccess not being read, i know its not being read coz even i delete them it still the same ?? anyone any idea?

  9. #9
    Join Date
    Mar 2010
    Posts
    55
    edit:

    now for sure mod rewrite is not enbled in my server i made test with file test found here
    http://www.webune.com/forums/how-to-...abled-t40.html

    i got error 404 same one i had with my website... is it kloxo bug? coz the module is loaded by defaut in my conf file
    what should i do?

  10. #10
    Join Date
    Mar 2010
    Posts
    55
    after lot of search i found out that i dont need to edit httpd.conf
    because i am on lighttpd and it has is own rewrite mod... so now i know the prob i would like someone help me to activated on lighttpd pls!!

  11. #11
    Join Date
    Mar 2010
    Posts
    55
    well i fixed the prob now the mod rewrite is woking but wanted to share my experince , i switched to httpd and removed lighttpd because lighttpd dosent handel well mod rewrite and many people on kloxo with lighttpd by default think by editing httpd.conf can activate mod rewrite think they dont know is httpd.conf belong to httpd apache webserver not to lighttpd webserver so it usless and even by editing lighttpd.conf ( lightppd webserver) wont activate mod rewrite until you add in kloxo gui in rewrite.url your own config ..and find more easy to use httpd apache webserver than lighttpd , well i would like to use lighttpd coz is less consuming ressources webserver, if someone got solution with lighttpd pls post it here!! thank you

  12. #12
    Join Date
    Jul 2008
    Posts
    456
    Yeah it would have helped to know you were using light - the app was set up for apache so even if everything was how it should have been the mod-rewrite wasn't going to work (which is why you were only getting the home page).

    I'm glad you got it all working - I guess you figured out the index.php edits then?

Similar Threads

  1. disable htaccess with other htaccess
    By Markovic in forum Hosting Security and Technology
    Replies: 2
    Last Post: 03-09-2010, 10:22 AM
  2. .htaccess mod_rewrite assistance
    By jdk in forum Programming Discussion
    Replies: 3
    Last Post: 01-29-2007, 06:45 PM
  3. .htaccess mod_rewrite assistance
    By jdk in forum Programming Discussion
    Replies: 3
    Last Post: 08-11-2006, 11:17 AM
  4. htaccess.ini -vs- .htaccess
    By rgartman in forum Hosting Security and Technology
    Replies: 1
    Last Post: 02-18-2005, 10:01 PM
  5. Need further assistance please..
    By sounds in forum Reseller Hosting
    Replies: 5
    Last Post: 01-28-2005, 12:26 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •