Webmaster Forum

Go Back   Webmaster Forum > Web Development > Coding Forum

Coding Forum Problems with your code? Discuss coding issues, including JavaScript, PHP & MySQL, HTML & CSS, Flash & ActionScript, and more.


Reply
 
LinkBack Thread Tools Display Modes
Share |
  #1 (permalink)  
Old 09-17-2010, 08:53 AM
Contributing Member
Latest Blog:
None

 
Join Date: 03-21-07
Posts: 88
iTrader: 0 / 0%
(Easy) What is htaccess for Rewrite dynamics urls oldname-id.html to newname-id.html

I want to redirect Rewrite dynamics oldname-id.html to newname-id.html , because the file name is changed


The file name is changed
the id is dynamic numbers



for example

old urls
Code:
http://www.domain.com/country-origin-Irish-page-1.html http://www.domain.com/country-origin-Irish-page-2.html http://www.domain.com/country-origin-Irish-page-3.html http://www.domain.com/country-origin-Irish-page-4.html and so on

to new urls
Code:
http://www.domain/country-origin-Irlandia,_Ireland,_Irish-page-1.html http://www.domain/country-origin-Irlandia,_Ireland,_Irish-page-2.html http://www.domain/country-origin-Irlandia,_Ireland,_Irish-page-3.html http://www.domain/country-origin-Irlandia,_Ireland,_Irish-page-4.html and so on




Please help guys what is the right htaccess for this
__________________
I like forum
 
Reply With Quote
  #2 (permalink)  
Old 09-22-2010, 12:39 PM
Luxmo's Avatar
Member
Latest Blog:
None

 
Join Date: 07-08-10
Location: City of Industry, California
Posts: 36
iTrader: 0 / 0%
Lightbulb

Quote:
Originally Posted by basketmen View Post
I want to redirect Rewrite dynamics oldname-id.html to newname-id.html , because the file name is changed
...
RewriteRule ^country-origin-Irish-page-([0-9]+).html?$ /country-origin-Irlandia,_Ireland,_Irish-page-$1.html [QSA,L]

Untested but should do the trick.

Although, you really should do a permanent redirect which I assume is probably what you want instead of what you asked for.

Last edited by Luxmo; 09-22-2010 at 12:43 PM.
 
Reply With Quote
Go Back   Webmaster Forum > Web Development > Coding Forum

Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
.htaccess vs. index.php/html krytikal Coding Forum 3 07-04-2010 09:06 PM
How to check the page extension for URLs? .php? .html? .etc... 2939195631902 Web Design Lobby 4 12-23-2008 06:01 PM
Rewrite URL - show cat,product name in .html dummie84 SEO Forum 5 04-12-2008 10:42 PM
Help with index.html and .htaccess elvisshades Web Design Lobby 4 04-03-2008 10:09 PM
& in URLS for HTML validation thing2b Web Design Lobby 4 06-28-2004 10:01 AM


V7N Network
Get exposure! V7N I Love Photography V7N SEO Blog V7N Directory


All times are GMT -7. The time now is 09:40 AM.
Powered by vBulletin
Copyright 2000-2014 Jelsoft Enterprises Limited.
Copyright © 2003 - 2014 Escalate Media




Search Engine Optimization by vBSEO 3.6.0 RC 2 ©2011, Crawlability, Inc.