View Full Version : URL Redirect Issues...

09 Jun 2008, 09:36
My forums are at www.dailysportspages.com/forums/index.php.
I have a news management script at the root, vB in the "forums" folder.
The .htaccess of my root is the following...

Options All -Indexes
ErrorDocument 404 /404.php
FileETag MTime Size
php_value memory_limit "48M"

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_HOST} ^dailysportspages.com
RewriteRule (.*) http://www.dailysportspages.com/$1 [R=301,L]
RewriteRule ^sitemap\.xml$ feed.php?output_type=sitemap [L]
RewriteRule ^(.*)(\.html|\.htm)$ index.php [L]
RewriteRule ^(.*)(\.rss|\.atom|\.txt)$ feed.php [L]
RewriteRule ^([^.]*)/?$ index.php [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

<IfModule mod_expires.c>
ExpiresActive on
ExpiresByType image/gif "access plus 1 months"
ExpiresByType image/jpeg "access plus 1 months"
ExpiresByType image/png "access plus 1 months"

I was able to figure out how to add the rewrite condition to do a 301 redirect so when people type in the non "www" URL they still got to my site.
My problem now is that before i did this people were reaching my site by bookmark.
And their bookmark has the site as "dailysportspages.com/forums"... no "index.php".
When they click on their bookmarks/favorites... they get a blank page.

Im sure there is a simple way to redirect them to the main page, but the few things i tried didnt work.

Any help?

11 Jun 2008, 22:27
Well, if you cant get to your site without www on it, then you need to check and fix the dns/apache records.

If they cant reach your site from the bookmark because it dont have index.php on the end, thats also an apache mis-configuration issue.