Jump to content

rewriting URLS fine.... but not display homepage correctly! (2hr trying no lie!)


luke777

Recommended Posts

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 :(

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.