Report

Htaccess redirection from old url to new url with parameters [Solved]

Ask a question Madden123 - Latest answer on Jul 2, 2016 09:21AM
Hello,
.
via htaccess in need help to redirect from old domain dirty to a clean new domain with parameters.
.
- new domain
- remove blog folder
- add .html at the end of article title
.
Original url:
https://subdomain.myoldsite.org/blog/2016/07/01/article-title

.
New url:
https://subdomain.mynewsite.org/2016/07/01/article-title.html

.
.
Thank you for your helps.
See more 
Helpful
+0
moins plus
Thank you for sharing! I have a question though, is this a question of how, or a statement of work?
Madden123- Jul 1, 2016 07:05PM
Hi,
sorry, I don't get what you mean.
Reply
Add comment
Helpful
+0
moins plus
We are not certain of your "scope" of work.

Are you asking how to do this type of task on the service "htaccess"?

"You should avoid using .htaccess files completely if you have access to httpd main server config file".

Add comment
Helpful
+0
moins plus
maybe this works, try this:
Redirect /olddirectory/oldfile.html http://exampleSCR.com/newdirectory/newfile.html

Add comment
Helpful
+0
moins plus
Hi,

work for me :

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ http://%1subdomain.mynewsite.org/$1.html [R=301,L]
ac3mark 5861Posts Monday June 3, 2013Registration date ModeratorStatus September 26, 2016 Last seen - Jul 2, 2016 09:21AM
Thank you for sharing!
Reply
Add comment

Members get more answers than anonymous users.

Being a member gives you detailed monitoring of your requests.

Being a member gives you additional options.

Not a member yet?

sign-up, it takes less than a minute and it's free!