Jump to content

how to redirect .com names


slic535
 Share

Recommended Posts

i tried some of that but it seemed to mess up the files in the htaccess. the files have been changed since the update and are different than what is commented on. i think the cubecart moderator would need to look into this for the new update of 5.1.4 and write a version specificaly for it.

Link to comment
Share on other sites

## File Security

<FilesMatch ".(htaccess)$">

Order Allow,Deny

Deny from all

</FilesMatch>

#### Apache directory listing rules ####

DirectoryIndex index.php index.htm index.html

IndexIgnore *

#### Rewrite rules for SEO functionality ####

<IfModule mod_rewrite.c>

RewriteEngine On

RewriteBase /~slic535/

######## START v4 SEO URL BACKWARD COMPATIBILITY ########

RewriteCond %{QUERY_STRING} (.*)$

RewriteCond %{REQUEST_FILENAME} !-f

RewriteRule cat_([0-9]+)(.[a-z]{3,4})?(.*)$ index.php?_a=category&cat_id=$1&%1 [NC]

RewriteCond %{QUERY_STRING} (.*)$

RewriteCond %{REQUEST_FILENAME} !-f

RewriteRule prod_([0-9]+)(.[a-z]{3,4})?$ index.php?_a=product&product_id=$1&%1 [NC]

RewriteCond %{QUERY_STRING} (.*)$

RewriteCond %{REQUEST_FILENAME} !-f

RewriteRule info_([0-9]+)(.[a-z]{3,4})?$ index.php?_a=document&doc_id=$1&%1 [NC]

RewriteCond %{QUERY_STRING} (.*)$

RewriteCond %{REQUEST_FILENAME} !-f

RewriteRule tell_([0-9]+)(.[a-z]{3,4})?$ index.php?_a=product&product_id=$1&%1 [NC]

RewriteCond %{QUERY_STRING} (.*)$

RewriteCond %{REQUEST_FILENAME} !-f

RewriteRule _saleItems(.[a-z]+)?(?.*)?$ index.php?_a=saleitems&%1 [NC,L]

######## END v4 SEO URL BACKWARD COMPATIBILITY ########

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteCond %{REQUEST_URI} !=/favicon.ico

RewriteRule ^(.*).html?$ index.php?seo_path=$1 [L,QSA]

</IfModule>

<IfModule mod_suphp.c>

suPHP_ConfigPath /home/slic535

<Files php.ini>

order allow,deny

deny from all

</Files>

</IfModule>

Link to comment
Share on other sites

  • 8 months later...

"Now what?"

 

I would suggest speaking with webhost. There is more than one way to write this, and the webhost should know server and apache well, and should not mind helping you with this if they are any good with customer service.

 

I have managed to redirect with .htaccess on many occasions, but am by no means an expert on this. I have used this code as well in htaccess if you want to try it.

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

It has to go somewhere after

RewriteEngine On

and before the FIRST

</IfModule>
Link to comment
Share on other sites

  • 11 months later...

I have been trying to get my website to redirect directknifesales.com to www.directknifesales. I asked my webhost for help and they made the www.directknifesales.com a subdomain to directknifesales.com. is this the correct way or are they way off? they didn't do anything in the .htaccess file. it does redirect to www not but not sure if its in the correct way. I don't want my main page showing as a sub domain do I? I am using 5.2.12

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...