cmgmyr Posted December 7, 2007 Share Posted December 7, 2007 I have a site that has dynamic kiosk stores and I can't seem to get everything to work how I want it to. 1. I need url.com/kiosk_name going to url.com/store/index.php?kiosk=kiosk_name (which I have that so far). 2. I need url.com/kiosk_name/products.php going to url.com/store/products.php?kiosk=kiosk_name 3. This also needs to handle a query sting...url.com/kiosk_name/products.php?product=1 going to url.com/store/products.php?kiosk=kiosk_name&product=1 Here is what I have so far: RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-F RewriteRule ^([^/\.]+)/([^/\.]+)?$ $2?kiosk=$1 RewriteRule ^([^/\.]+)/?$ store/index.php?kiosk=$1 [L] I know I'm doing something wrong and I'm sure some other things need to be added. What should this be? Thanks, -Chris Quote Link to comment Share on other sites More sharing options...
cmgmyr Posted December 8, 2007 Author Share Posted December 8, 2007 I altered the code a little bit, here is what I have now: RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-F RewriteRule ^([^/\.]+)/?$ store/index.php?kiosk=$1 [L,PT] RewriteRule ^([^/]*)/([^/]*)$ store/$2?kiosk=$1 [QSA,L,PT] Now, the virtual directories work 100%, but when I go to the root of the site, or any of the files in the root the CSS and the images do not come up. How can I adjust this code so that it doesn't effect the root files? Thanks, -Chris Quote Link to comment Share on other sites More sharing options...
hackerkts Posted December 12, 2007 Share Posted December 12, 2007 You will need to put the full URL for CSS and images. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.