luke777 Posted January 31, 2010 Share Posted January 31, 2010 I have got a little further with this after hours and hours.... but im still having problems getting the page index.html that is actually physically there in the directory to show up at default inside htaccess is - RewriteCond %{REQUEST_FILENAME} !-f [NC] rewriteRule ^(.*)$ /turf/grabpage.php?page=$1 [L] RewriteCond %{HTTP_HOST} ([^.]+)\.mysite.com [NC] RewriteCond %{HTTP_HOST} !^www\.mysite\.com RewriteRule ^files/([^/]+)/([^/]+) /turf/grabpage.php?page=$1&file=$2 [NC] Options +FollowSymlinks and basically what it does is if someone types - http://www.mysite.com/keyword-one a page will be read from http://www.mysite.com/turf/grabpage.php?page=keyword-one And the grabpage.php script will create a page about "keyword-one" thats all working fine. The only problem is the site is creating a page about "" (nothing) when just http://www.mysite.com/ is visited. All i want to do is get the index.html to display on the main directory of the site instead of a page generated by the grabpage.php script. Someone please help me, i promise i've been working at this for 3 hours now because I didn't want to bother anyone. Desperate for some help! thanks Quote Link to comment https://forums.phpfreaks.com/topic/190414-rewriting-urls-fine-but-not-display-homepage-correctly-2hr-trying-no-lie/ Share on other sites More sharing options...
luke777 Posted January 31, 2010 Author Share Posted January 31, 2010 noone have any answers then? damn this is bad Quote Link to comment https://forums.phpfreaks.com/topic/190414-rewriting-urls-fine-but-not-display-homepage-correctly-2hr-trying-no-lie/#findComment-1004586 Share on other sites More sharing options...
premiso Posted January 31, 2010 Share Posted January 31, 2010 The problem is that anything after the / gets filtered as keyword. I would instead make a "keyword" to take in the keywords, such as: yousite.com/k/keywords-to-pass-to-garb or yoursite.com/garb/keywords-to-pass-to-garb This way only that is filtered to it and your index.html stays the same. Hope that helps. Quote Link to comment https://forums.phpfreaks.com/topic/190414-rewriting-urls-fine-but-not-display-homepage-correctly-2hr-trying-no-lie/#findComment-1004639 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.