timgolding
04-18-2009, 01:24 AM
I have this htaccess that works for me at work. It uses mod rewrite to convert the folder levels in the url to "Get query strings"
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{query_string} ^(.*)$
RewriteRule ^([A-Z][A-Za-z0-9_\.-]+)$ /index.php?top_level=$1&qs=%1 [QSA]
RewriteRule ^([A-Z][A-Za-z0-9_\.-]+)/([A-Za-z0-9_\.-]+)$ /index.php?top_level=$1&second_level=$2&qs=%1 [QSA]
RewriteRule ^([A-Z][A-Za-z0-9_\.-]+)/([A-Za-z0-9_\.-]+)/([A-Za-z0-9_\.-]+)$ /index.php?top_level=$1&second_level=$2&third_level=$3&qs=%1 [QSA]
RewriteRule ^([A-Z][A-Za-z0-9_\.-]+)/([A-Za-z0-9_\.-]+)/([A-Za-z0-9_\.-]+)/([A-Za-z0-9_\.-]+)$ /index.php?top_level=$1&second_level=$2&third_level=$3&forth_level=$4&qs=%1 [QSA]
</IfModule>
However on my Servage.net account it doesn't work. htaccess is available on the account and apparently mod rewrite is also supported. Can any one see what's different. Am I doing this the wrong way I know that to get this working at work I have to put certain things in my apache conf like this
<Directory "/home/sites/thisdomain">
AllowOverride Options FileInfo
</Directory>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteLog "/home/log/rewrite.log"
RewriteLogLevel 3
RewriteCond %{REQUEST_METHOD} ^TRACE
RewriteRule .* - [F]
</IfModule>
I guess servage don't have this in? Is there another way. It must be possible since they state they offer support for mod rewrite.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{query_string} ^(.*)$
RewriteRule ^([A-Z][A-Za-z0-9_\.-]+)$ /index.php?top_level=$1&qs=%1 [QSA]
RewriteRule ^([A-Z][A-Za-z0-9_\.-]+)/([A-Za-z0-9_\.-]+)$ /index.php?top_level=$1&second_level=$2&qs=%1 [QSA]
RewriteRule ^([A-Z][A-Za-z0-9_\.-]+)/([A-Za-z0-9_\.-]+)/([A-Za-z0-9_\.-]+)$ /index.php?top_level=$1&second_level=$2&third_level=$3&qs=%1 [QSA]
RewriteRule ^([A-Z][A-Za-z0-9_\.-]+)/([A-Za-z0-9_\.-]+)/([A-Za-z0-9_\.-]+)/([A-Za-z0-9_\.-]+)$ /index.php?top_level=$1&second_level=$2&third_level=$3&forth_level=$4&qs=%1 [QSA]
</IfModule>
However on my Servage.net account it doesn't work. htaccess is available on the account and apparently mod rewrite is also supported. Can any one see what's different. Am I doing this the wrong way I know that to get this working at work I have to put certain things in my apache conf like this
<Directory "/home/sites/thisdomain">
AllowOverride Options FileInfo
</Directory>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteLog "/home/log/rewrite.log"
RewriteLogLevel 3
RewriteCond %{REQUEST_METHOD} ^TRACE
RewriteRule .* - [F]
</IfModule>
I guess servage don't have this in? Is there another way. It must be possible since they state they offer support for mod rewrite.