Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#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
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]
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
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
Offline
Re: upgrading static site to txp site, seo question
Could you post the URLs and your redirects?
Offline
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