Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2008-01-03 03:02:39

Rambling
New Member
Registered: 2008-01-03
Posts: 5

Re: upgrading static site to txp site, seo question

I’m also currently in the process of moving from a static site to a TxP site. Fortunately, by using the names of the folders on the old site as section names and URL-Only Titles for the articles, I’ve been able to get the URLs to nearly match, except for the .html extension. I want to redirect requests to the old html urls to their extensionless TxP counterparts, so I tried adding

RewriteRule ^(.*).html$ $1 [R] 

to my .htaccess file. When I visited the old URLS, I get served http://localhost/Applications/MAMP/htdocs/index.php/First_Post (the location of my testing server on my Mac) rather than the proper page. I’m thinking that there has to be some other RewriteRule rule that’s causing a conflict, since I tested the regular expression in my rule with a regex tester and it worked fine. What’s going on?

Offline

#14 2008-01-03 14:29:55

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: upgrading static site to txp site, seo question

I’m far from being an redirect/regex expert but yu could try adding a backslash in front of the second dot, to escape it.
Like this:

RewriteRule ^(.*)\.html$ $1 [R]


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#15 2008-01-03 20:48:23

Rambling
New Member
Registered: 2008-01-03
Posts: 5

Re: upgrading static site to txp site, seo question

maniqui wrote:

I’m far from being an redirect/regex expert but yu could try adding a backslash in front of the second dot, to escape it.
Like this:

RewriteRule ^(.*)\.html$ $1 [R]

I tried this and it still produces the same result.

Offline

#16 2008-01-12 00:56:49

kvnmcwebn
Member
From: Ireland
Registered: 2007-01-27
Posts: 724
Website

Re: upgrading static site to txp site, seo question

ive put the redirects in the .htaccess file its working pretty good for me but 100%. For instance it doesnt seem to work in safari at all.

Last edited by kvnmcwebn (2008-01-12 00:57:08)


its a bad hen that wont scratch itself.
photogallery

Offline

#17 2008-01-12 01:01:26

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: upgrading static site to txp site, seo question

For instance it doesnt seem to work in safari at all.

What does your .httaccess contain? Could help to solve this ;)

And one another thing: have you clear your browser’s cache?

Cheers!

Last edited by Gocom (2008-01-12 01:02:31)

Offline

#18 2008-01-12 01:04:10

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

Re: upgrading static site to txp site, seo question

Could you post the URLs and your redirects?

Offline

#19 2008-01-12 16:29:16

kvnmcwebn
Member
From: Ireland
Registered: 2007-01-27
Posts: 724
Website

Re: upgrading static site to txp site, seo question

doh! i hadnt cleared the cache it in safari…. sorry

heres my htaccess file anyway.

#DirectoryIndex index.php index.html

Redirect 301 /pensioins.htm http://www.url.ie/pensions
Redirect 301 /protection.htm http://www.url.ie/protections
Redirect 301 /corporate.htm http://www.url.ie/business/
Redirect 301 /inheritance.htm http://www.url.ie/inheritance-tax/
Redirect 301 /contactus.htm http://www.url.ie/business/
Redirect 301 /aboutus.htm http://www.url.ie/About-Us/
Redirect 301 /mortgages.htm http://www.url.ie/Mortgages/11/the-mortgage-centre
Redirect 301 /staff.htm http://www.url.ie/Meet-The-Team/

#Options +FollowSymLinks
#Options -Indexes

<IfModule mod_rewrite.c> RewriteEngine On #RewriteBase /relative/web/path/

RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^(.+) – [PT,L]

RewriteRule ^(.*) index.php
</IfModule>

#php_value register_globals 0

Last edited by kvnmcwebn (2008-01-12 16:30:50)


its a bad hen that wont scratch itself.
photogallery

Offline

Board footer

Powered by FluxBB