|
|||||||
| Computers, Coding, Websites or anything techie Help, assistance, advice and discussions on anything to do with computers, hosting, web coding or anything technical! |
|
|
LinkBack | Thread Tools | Display Modes |
|
||||
|
Bit stumped with this one, and managed to break the forum earlier.
We used to run on a different URL, which is now defunct, but I want to put a 301 redirect from mylocalforums.com to www.mylocalforums.com Thought I had the syntax right, but as soon as I change it, the Forum (other than the index page) goes off the air ![]() Using VBSEO, but from what I can see, it still references the .htaccess Current .htaccess is: RewriteEngine On RewriteRule ^((urllist|sitemap_).*\.(xml|txt)(\.gz)?)$ vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1 [L] RewriteCond %{REQUEST_URI} !(admincp/|modcp/|cron|vbseo_sitemap) RewriteRule ^((archive/)?(.*\.php(/.*)?))$ vbseo.php [L,QSA] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !/(admincp|modcp|clientscript|cpstyles|images)/ RewriteRule ^(.+)$ vbseo.php [L,QSA] RewriteCond %{HTTP_HOST} ^usabusinessforums.us$ [OR] RewriteCond %{HTTP_HOST} ^www.usabusinessforums.us$ RewriteRule ^(.*)$ "http\:\/\/www\.mylocalforums\.com$1" [R=301,L] So surely I just need to replace the last 3 lines with: RewriteCond %{HTTP_HOST} ^mylocalforums.com$ [nc] RewriteRule ^(.*)$ "http\:\/\/www\.mylocalforums\.com$1" [R=301,nc,L] Added nc just for any case sensitive issues. But If I save this, it doesn't work ![]() Any apache gurus?
__________________
cheers Steve Forum Admin - teaboy and general gofer... Forum Rules and FAQ's at a glance | Find me on Google+ | or even Facebook! My Local Services - The UK and US Online Business Directory | JobsVitae - Recruitment Help and CV Creation If you're here to spam, then expect a ban
|
|
||||
|
cant this be done via the hosts using the dns settings to divert all traffic to the www domain insted of using a 301 via the htaccess?
i.e. i can use either poshkitty.co.uk or Posh Kitty - Personalised Gifts for all the family for all occassions to get to my site |
|
||||
|
i have found something else that might help too for redirecting non-www to www:
HTML Code:
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^yoursite.com [NC]
RewriteRule ^(.*)$ http://www.yoursite.com/$1 [L,R=301]
|
|
||||
|
Quote:
Quote:
More research needed me thinks!
__________________
cheers Steve Forum Admin - teaboy and general gofer... Forum Rules and FAQ's at a glance | Find me on Google+ | or even Facebook! My Local Services - The UK and US Online Business Directory | JobsVitae - Recruitment Help and CV Creation If you're here to spam, then expect a ban
|
| Bookmarks |
| Tags |
| .htaccess, apache |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|