Forum Moderators: phranque

Message Too Old, No Replies

need a bit of help with htaccess issues

         

lorax

7:33 pm on May 19, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I've got a client that I built an X-Cart shopping cart for. The whole thing resides under the sub-dir "/shop/" (web path)

When we went live I used the following in htaccess to ensure anyone coming in at the root would be sent to the sub-dir but we've been noticing some weird behavior and now I'm thinking I missed something or should have executed this differently.

RewriteEngine on
RewriteCond %{HTTP_HOST} thewebsite\.com [NC]
RewriteCond %{REQUEST_URI}!/shop
RewriteCond %{REQUEST_URI}!^/(manager/.*Śmanager)$
RewriteRule (.*) /shop/$1 [L]

lorax

9:11 pm on May 23, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Still not having much luck with sorting this out. Very odd behaviour. How best to systematically troubleshoot (or eliminate the htaccess file) without taking the site offline for more than a few minutes?

jdMorgan

10:51 pm on May 23, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Without more info on *what* weird results you see, all I can offer is a few troubleshooting tips. Well... only one, mainly. It is sometimes useful to *temporarily* change internal rewrites to external redirects, so that you can see what's happening in the browser address bar. Of course, this only works for pages, not included files and images -- you still have to 'view image link' or use Mozilla's 'Page Info' Tool to see how those are being rewritten.

RewriteEngine on
RewriteCond %{HTTP_HOST} example\.com [NC]
RewriteCond %{REQUEST_URI} !/shop
RewriteCond %{REQUEST_URI} !^/(manager/.*Śmanager)$
RewriteRule (.*) http://example.com/shop/$1 [R=301,L]

Jim

lorax

6:33 pm on May 30, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



thanks jdmorgan. I think I've resolved this issue - crosses fingers... ;)