CMS Forum CMS Forum
September 05, 2010, 09:58:21 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: << Main Site   The CMS Forum is now live. Post a question - answer someone's query - tell us some CMS news. Some things on this forum can't be seen till you login. Anyone can register & login.
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: new old urls  (Read 1309 times)
wiseguy
Acolyte
*
Posts: 2


« on: March 15, 2009, 01:14:06 AM »

I'm planning on moving my old site (Drupal 5.7) to Joomla 1.5.

Here's my problem:

I've got a hole bunch of urls with the following pattern

my.domain.com/2005/12/31/very-good-stuff.html

which I want to change to

www.domain.com/2005/12/31/very-good-stuff.html

It's about 200 pages, do I have to do that manually?

Thanks Cheesy
Logged
chris.p
Administrator
Contributor
*****
Posts: 42


WWW
« Reply #1 on: March 17, 2009, 09:21:40 AM »

Not sure exactly how you want to change it because the examples you gave are the same - unless you're talking about the www factor.

To fix that - the change from non-www to the www fully-qualified format - you use a standard htaccess script. You may find you have to try a couple of variations before you get one that works 100% on your server though.
Logged
wiseguy
Acolyte
*
Posts: 2


« Reply #2 on: March 19, 2009, 11:57:33 PM »

We'ell, the site is on a subdomain - at the moment. I've got quite a few links to single pages, and I would like to keep them. So when someone calls

Code:
MY.domain.com/2005/12/03/very-good-stuff

I want him to end up on the new probably better url
Code:
WWW.domain.com/tricks+tips/very-good-stuff

I'm talking about roughly 200 pages... Huh
Logged
chris.p
Administrator
Contributor
*****
Posts: 42


WWW
« Reply #3 on: March 23, 2009, 05:42:31 AM »

OK, here's some rewrite subdomain to domain scripts.


subdomain >> domain

RewriteCond %{HTTP_HOST} ^subdomain.example.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.subdomain.example.com$
RewriteRule ^(.*)$ http://www.yoursite.com/ [L,R=301]
[redirects subdomain to domain, also fixes www]

RewriteCond %{HTTP_HOST} !^www\.example\.com
RewriteRule ^(.*)$ http://www.example.com/directory/$1
[redirects subdomain.example.com >> example.com/directory/  -- but doesn't fix www]

RewriteCond %{HTTP_HOST} ^sub.example.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.sub.example.com$ [OR]
RewriteCond %{HTTP_HOST} ^example.(.*)
RewriteRule ^(.*)$ http://www.example.com/directory/$1 [R=301,L]
[as above but fixes www]

You'll have to play around with these, because scripts often have to be changed between servers.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF | SMF © 2006-2009, Simple Machines LLC