[solved] .htaccess when host doesn't support 301 redirect

Help with getting the CMS CORE package up and running. This does not include 3rd party modules, PHP scripts, anything downloaded via module manager or from any external source.
Locked
jospanner
Forum Members
Forum Members
Posts: 105
Joined: Tue Mar 25, 2008 11:34 pm

[solved] .htaccess when host doesn't support 301 redirect

Post by jospanner »

Dear all

A new client on new host has raised the following issues - they don't support 301 re-direct in .htaccess.
So currently all it has as they have supplied is:

RewriteEngine on
RewriteOptions inherit
RewriteBase /bin-cgi/
RewriteRule ^\.cgi$ - [T=application/x-httpd-cgi]

And my config has

#------------
#URL Settings
#------------

#What type of URL rewriting should we be using for pretty URLs? Valid options are:
#'none', 'internal', and 'mod_rewrite'. 'internal' will not work with IIS some CGI
#configurations. 'mod_rewrite' requires proper apache configuration, a valid
#.htaccess file and most likely {metadata} in your page templates. For more
#information, see:
#http://wiki.cmsmadesimple.org/index.php ... ty_URL.27s
$config['url_rewriting'] = 'internal';

#Extension to use if you're using mod_rewrite for pretty URLs.
$config['page_extension'] = '.html';

#If you're using the internal pretty url mechanism or mod_rewrite, would you like to
#show urls in their hierarchy? (ex. http://www.mysite.com/parent/parent/childpage)
$config['use_hierarchy'] = true;

#If using none of the above options, what should we be using for the query string
#variable? (ex. http://www.mysite.com/index.php?page=somecontent)
$config['query_var'] = 'page';

This gets me to urls as follows:

http://www.webaddress.co.uk/index.php/contact-us.html

When what I really need is:

http://www.webaddress.co.uk/contact-us.html

Can anyone shed any light on what I can add to my .htaccess to achieve this? I also need to allow forms to get through using Formbuilder.

Site details - running 1.9.4.2 with only Gallery and Formbuilder modules added to standard install.
Last edited by jospanner on Mon Aug 08, 2011 10:47 am, edited 1 time in total.
User avatar
M@rtijn
Power Poster
Power Poster
Posts: 706
Joined: Sat Nov 14, 2009 4:54 pm

Re: .htaccess when host doesn't support 301 redirect

Post by M@rtijn »

Find another host, yesterday. ;)

I've never heard about not being able to redirect with 301's, or at least not in this century
Make your community a better place!
jospanner
Forum Members
Forum Members
Posts: 105
Joined: Tue Mar 25, 2008 11:34 pm

Re: .htaccess when host doesn't support 301 redirect

Post by jospanner »

I agree but its my clients choice not mine....anything I can do?
replytomk3

Re: .htaccess when host doesn't support 301 redirect

Post by replytomk3 »

Find another host, and tell me the name of the old one. I collect idiotic hosting companies lists.
Locked

Return to “[locked] Installation, Setup and Upgrade”