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.

Thread Tools Display Modes
Share |
Old 09-17-2010, 08:53 AM
basketmen basketmen is offline
Contributing Member
Join Date: 03-21-07
Posts: 97
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
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
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
Reply With Quote



Old 09-22-2010, 12:39 PM
Luxmo's Avatar
Luxmo Luxmo is offline
Join Date: 07-08-10
Location: City of Industry, California
Posts: 36
iTrader: 0 / 0%

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


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

Forum Jump

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 07: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:26 PM.
Powered by vBulletin
Copyright 2000-2014 Jelsoft Enterprises Limited.
Copyright © 2003 - 2018 VIX-WomensForum LLC