I am changing an old site which contains links with .html extension. But I cannot seem to work with concrete5 to add .html extension.
I have tried to override several core classes but not working.
You probably should do that through your htaccess. The same way you can use an htaccess directive to remove .php from URLs you can do the same to add .html
But really, why would you want to do that? If it's to make sure the old URLs still work you should just make sure htaccess redirects anything ending in .html to its equivalent without the .html
I'd approach this in the opposite direction. .html adds nothing semantically to the URLs anyway.
Use permanent 301 redirects from the old pages names to the new ones without .html in your .htaccess - pretty much the whole point of 301s, and you can even clean up some page names and add https along the way:
Redirect 301 /old_page_name.html https://newsite.com/page-name
Generate /sitemap.xml from a cron job, the search engines will find it.
You could submit it to Google, Bing, and Yahoo, but either way you won't lose any link juice and any sites linking to the old ones will get the right content.
Related
I have a domain (ex. test.com) on which wordpress is installed. I also have a another wordpress installed on a subdomain(ex. test.com/blabla). Blabla contains many indexed pages but now I want to remove them completely and delete the wordpress on the blabla subdomain.
How can I achieve that? Keep in mind that I don't want anything to change in test.com
I would really appreciate your help,
Thank you in advance.
The .htaccess file can help you to achieve that. Please invest some time to dive into that.
You have to use the
Redirect 301
for your subdomain to redirect to the new page or any other page if you want to.
Make sure, that your robots.txt allows Google to access the old page directory.
When Google is able to track that the old page has been removed, it will no longer appear as search result.
Then you no longer need to rediect.
I have a WordPress site. which is now moving to asp.net cms (Sitefinity). In this process my url structures are getting changed but I want to keep the traffic of previous urls on the new urls as well.
Old as the domain will be transferred to new site old pages will not be found (404)
Things making it complicated.
Old and new site has lots of Dynamic urls
Old site has different urls structure than new url
I do not wan't to put all these urls in web.config file.
Solutions I tried
I tried to write 301 redirect on Robot.txt as I can capture old and new url at the time of migration
I searched for solutions all over net but didn't got any straight forward solutions
One of the forums mentioned that we should not write 301 redirects on Robot.txt
Don't know what to follow or where to search. Please guide me to correct path.
Thank You
Chandresh
If you have an identifiable pattern between the two using the URL rewrite module would be your best bet. Or write some code to insert the old urls as multiple URLs on the content items.
Do you have an example of the old URL and what the new URL will look like? It is possible that if you know how the URL pattern will change you can create a redirect rule in your web.config.
Also, Sitefinity allows you to create redirects as well. This includes creating alternative urls for pages or creating redirecting pages.
The exact solution really depends on how much the URL is changing and how many redirect urls are needed.
here is my issue:
I have a static html site and under blog I have wordpress installed. Now I added a new database and installed a second wordpress that works perfectly, but I want to 301 redirect old .html pages to new ones so I can keep the links and rankings, but every time I try to change the .htaccess file my wordpress totally crashes and I have to re-install.
I just want to redirect dozen .html pages to new wp versions, example, I want to redirect www.site.com/page.html to www.site.com/page/
Can someone point me in the right direction?
Thanks
The easiest way to do this, is to use the redirection plugin for wordpress.
We used it when we converted an old static site and it works well and tracks the number of hit's etc.
http://wordpress.org/extend/plugins/redirection/
I've a Joomla site but I want to move it to Drupal-6 site. How should I go about changing existing url's? Should I add the redirection in .htacces or use any redirect modules?
One main reason of moving is the forum module in Drupal which I'd like to use.
I'd be using nodealias & global redirect modules.
In my site I'm using SH404SEF to generate urls(with .html suffix).
You can absolutely place a redirect in the .htaccess file and reference the pathauto generated path.
http://drupal.org/project/pathauto generates URL aliases based on title etc. and then put something like:
RewriteRule ^misc/about.html http://www.example.com/aboutus/ [R=301,L]
for each URL. (This is better off in your apache httpd.conf file for performance reasons.)
Or there is a module:
http://drupal.org/project/path_redirect
Which looks like it does just what you want but I've not tried it.
I've converted an associates old website to Wordpress. The domain name remains the same. All the old .aspx files fall into the root of the domain folder (www.xxx.com) with no .htaccess file while the Wordpress replacement site has an .htaccess file - domain is www.xxx.com/ctpc
I have 36 old .aspx files in the root that I need to permanently redirect to the respective wordpress documents in the /ctpc subfoler.
I can do a little bit of code, html in particular and with good instructions can paste code, but writing code to get this done is obviously over my head.
I've researched this for a day and half now and am going downhill if any direction at all. I'd be grateful for any help possible.
thank you,
~Jennifer
I would recommend putting a .htaccess file in the root domain, with a redirect for each of the 36 .aspx files, like this:
Redirect 301 /oldpage1.aspx http://www.newsite.com/ctpc/newpage
Put one of those on each line for each of the .aspx files. Do this in a text editor, like Notepad for Windows, save it as .htaccess, and then upload it to the root domain.
There's a WordPress redirection plugin that would allow you to manage all of this from within the WordPress admin section. You can create redirects for all of your 36 pages and then keep track of how many time the pages are getting referenced and which pages still have old links.
If you're using permalinks in Wordpress, put the 301 redirect that is listed above the Wordpress rewriting in your .htaccess file. And edit your .htaccess file yourself; if you let Wordpress automatically write to your .htaccess file, sometimes you'll end up with multiple rewrite entries that can cause problems.
Please Use Redirections Plugin
Under Add new redirection, put the following:
Source URL: /(.*).aspx
Regular expression: checked ☑ OR Select "REGEX" after Source URL
Target URL: /$1/
One solution may be to add a META refresh tag to the header section of each of the .ASPX files that you need to redirect.
For example:
<HTML>
<HEAD>
<META http-equiv="refresh" content="5;URL=http://www.xxx.com/ctpc/new-file">
...
This tag says to refresh the page in 5 seconds by sending the user to www.xxx.com/ctpc/new-file. You can make this an immediate refresh by changing the time to 0.