Results 1 to 12 of 12
Thread: Need assistance on .htaccess
-
06-15-2010, 12:39 PM #1Junior Guru Wannabe
- 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
-
06-15-2010, 01:36 PM #2Temporarily Suspended
- 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>
-
06-15-2010, 01:50 PM #3Web Hosting Evangelist
- 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.
-
06-15-2010, 02:37 PM #4Junior Guru Wannabe
- Join Date
- Mar 2010
- Posts
- 55
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
-
06-15-2010, 04:44 PM #5Web Hosting Evangelist
- 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.
-
06-15-2010, 05:13 PM #6Junior Guru Wannabe
- Join Date
- Mar 2010
- Posts
- 55
-
06-15-2010, 05:30 PM #7Web Hosting Evangelist
- 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.
-
06-16-2010, 06:45 AM #8Junior Guru Wannabe
- 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?
-
06-16-2010, 07:33 AM #9Junior Guru Wannabe
- 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?
-
06-16-2010, 10:53 AM #10Junior Guru Wannabe
- 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!!
-
06-16-2010, 01:52 PM #11Junior Guru Wannabe
- 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
-
06-16-2010, 02:55 PM #12Web Hosting Evangelist
- 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
-
disable htaccess with other htaccess
By Markovic in forum Hosting Security and TechnologyReplies: 2Last Post: 03-09-2010, 10:22 AM -
.htaccess mod_rewrite assistance
By jdk in forum Programming DiscussionReplies: 3Last Post: 01-29-2007, 06:45 PM -
.htaccess mod_rewrite assistance
By jdk in forum Programming DiscussionReplies: 3Last Post: 08-11-2006, 11:17 AM -
htaccess.ini -vs- .htaccess
By rgartman in forum Hosting Security and TechnologyReplies: 1Last Post: 02-18-2005, 10:01 PM -
Need further assistance please..
By sounds in forum Reseller HostingReplies: 5Last Post: 01-28-2005, 12:26 PM