Home : Products : Gossamer Links : Discussions :

Products: Gossamer Links: Discussions: Server upgrade - Rewrite problems with index pages: Edit Log

Here is the list of edits for this post
Server upgrade - Rewrite problems with index pages
I use rewrite rules to display all my pages dynamically and don't physically build any Detailed pages ( see this thread from 2010) and Andy did some custom work for me.

My host has just upgraded their server (to cloud) and now my index pages are static unless I add the index file name.

mysite.com/ = static
mysite.com/index.php = dynamic

mysite.com/category1/ = static
mysite.com/category1/index.php = dynamic
mysite.com/category1/page2.php = dynamic

This is the same with any index page in any directory.

Do I need to add something to the htaccess file to get these do display as dynamic or is this something that I need to flag up with my host as it was working fine before the transfer?

Current htaccess file:
Code:
RewriteEngine on

# ANDY NEW!
RewriteCond %{REQUEST_FILENAME} !phpinfo\.php$
RewriteCond %{REQUEST_URI} !xyz
RewriteRule ^(.*)_([0-9]+).php$ /cgi-bin/links/page.cgi?g=Detailed/$2.php;extra=$1;c=$3 [L]

RewriteCond %{REQUEST_FILENAME} !phpinfo\.php$
RewriteCond %{REQUEST_URI} !xyz
RewriteRule ^(.*)_([0-9]+).php$ /cgi-bin/links/page.cgi?g=$1.php;extra=$1;b=1 [L]
# END ANDY CODES

RewriteCond %{REQUEST_FILENAME} !phpinfo\.php$
RewriteCond %{REQUEST_URI} !xyz
RewriteRule ^(.*).php /cgi-bin/links/page.cgi?g=$1.php [L]

RewriteCond %{REQUEST_FILENAME} !phpinfo\.php$
RewriteCond %{REQUEST_URI} !xyz
RewriteRule New/(.*)$ /cgi-bin/links/page.cgi?g=New/$1 [L]

RewriteCond %{REQUEST_FILENAME} !phpinfo\.php$
RewriteCond %{REQUEST_URI} !xyz
RewriteRule Ratings/(.*)$ /cgi-bin/links/page.cgi?g=Ratings/$1 [L]

RewriteCond %{REQUEST_FILENAME} !phpinfo\.php$
RewriteCond %{REQUEST_URI} !xyz
RewriteRule Cool/(.*)$ /cgi-bin/links/page.cgi?g=Cool/$1 [L]

RewriteCond %{HTTP_HOST} ^mysite.com$ [OR]
RewriteCond %{HTTP_HOST} ^mysite.net$ [OR]
RewriteCond %{HTTP_HOST} ^www.mysite.net$ [OR]
RewriteCond %{HTTP_HOST} ^mysite.org$ [OR]
RewriteCond %{HTTP_HOST} ^www.mysite.org$
RewriteRule ^(.*)$ http://www.mysite.com/$1 [R=301,L]

Last edited by:

MJB: Oct 14, 2013, 3:31 PM

Edit Log: