Zen Cart Logo
Forums / General Questions / Need help configuring htaccess for page not found issue

Need help configuring htaccess for page not found issue

Views: 433

Results 1 to 2 of 2
8 Apr 2016, 2:04 PM
#1
largomike1 avatar

largomike1

New Zenner

Join Date:
Apr 2009
Posts:
25
Plugin Contributions:
0

Need help configuring htaccess for page not found issue

I recently upgraded our site to 1.54. I'm trying to test out the "page not found" logic. I noticed that the site behaves differently when you attempt to access a dummy location in a subfolder than in the root. The style sheet seems totally messed up and I can't figure out how to fix it.

For example:
If you go to http://pursebling.com/somefile.html, you get a decent looking "page not found".
However,
If you go to http://pursebling.com/somefolder/somefile.html then you can see the styles are messed up. I looked at the page source and all of the stylesheets are included in both versions. My guess is because the latter example is in a sub folder, it can't find the stylesheet?

I thought, maybe I should have some entry in the .htaccess file to redirect user to the root "page not found", but my htaccess file has a fair amount of entries in it due to using an SEO friendly URL plugin. Any help would be greatly appreciated. Thanks!

8 Apr 2016, 2:10 PM
#2
largomike1 avatar

largomike1

New Zenner

Join Date:
Apr 2009
Posts:
25
Plugin Contributions:
0

Re: Need help configuring htaccess for page not found issue

OK - it seems I may have figured it out. I added this to the top of my htaccess file:

ErrorDocument 404 [URL]http://pursebling.com/index.php?main_page=page_not_found[/URL]

Once I cleared my browser cache, it seems to work. Yeah!:D