How to rewrite "domain/1*" on Joomla website - .htaccess

I had an old website with pages which had "1" as first symbol.
For example,
www.example.com/1antony.aspx
www.example.com/1tommy.aspx
I moved website to Joomla and I cannot redirect those pages as they appear as home page on the new website. I noticed this problem on all of my Joomla websites.
Everywhere I use "RewriteBase /" in htaccess.
Is it a bug or how to fix it?

I've noticed that I had article with ID 1. I created copy with ID over 100 and deleted all articles from 1 to 9, now it redirects correctly. It seems that when you type in number joomla calls article with that ID number. And the webpage looked like the homepage because all modules were present, but I disabled materials on my homepage.
Hope this helps.

Related

Opencart : How can change URL of all my site to SEO frindly

I'm using Opencart 2.x version.
Seo urls not works and my links like information/information_id=1
I supposed that it should be changed automatically, but not. All site's links for product, categories and infromation pages had been changed, but that added by me manually - NOT. Can anyone halp me and answer why ?

301 redirect all ugly permalinks from old site to new site

So I overhauled a complete website the other day and found some of the old pages snippets in the google search results. The old page had an ugly link structure such as domain.com/index.php?article_id=123. The new site uses pretty permalinks such as domain.com/pagetitle.
Is there a piece of code I could put into the .htaccess file in order to redirect all ugly permalinks to the new site?
Edit
Additional info: The old links don't exist anymore. The old site and the new one's structure differs a lot, not all contents from the all site were adapted. Main problem is that I don't want the old links in the google search results to always throw a 404 at the user.
Maybe something of a
RedirectMatch ^/index.php?$ http://www.example.com/somepage
This will redirect all pages starting from index.php to another location
I don't have the rep to comment on the other answer, but that is a very improper solution if you value your SEO at all. A redirect is your way of telling Google "I've got the same page, I just moved it". There's a much better way to do this that won't negatively affect your SEO at all.
You should create some logic to redirect those old links to your new links.
Here's an example of how you could do it:
Go to the beginning of your program, before any logic takes place.
Use code to retrieve the requested page. In this case, you might be able to get away with simply checking for GET variables that match article_id.
If the requested page is a match for your GET variable, run a query to see if the article exists. (Obviously, you'll still want to 404 articles that don't exist).
Retrieve the content used to generate the new, more SEO-friendly URL's. This is probably the article title or something.
Write some code to generate the new article title. At this point, if this is working properly, you should be able to system print that new URL to make sure it's correct.
301 redirect to the new URL. Don't 302 or any other number, 301 redirect it. This lets search engines know it's the same page and content, but it has permanently moved.

Joomla 2.5 - Adapting Custom URLs with .htaccess or tool

i've just finished a website with a database for golf-holidays. Now the clue is, i am using joomla internal url-rewrite to generate short urls which is generally great, i like it. The only thing left for SEO optimization would be, if i could point an individual URL to each offer listed in the database. A url to a specific offer looks like this :
http://www.mydomain.com/golfurlaub-mit-greenfee/angebote/urlaubsangebot.html?oid=128
"urlaubsangebot.html" would be the detail site, passed with the parameter "oid" for offerID and then the ID of the offer in my database.
Would it be possible to create a rule / use a tool where i would be agle to assign a custom URL to every offer? For example :
NewURL
http://www.mydomain.com/offers/spain/my-offer-name.html
OldURL
http://www.mydomain.com/golfurlaub-mit-greenfee/angebote/urlaubsangebot.html?oid=128
I tried using tools such as SEF404 and JoomSEF but they rather break my whole structure than help me apply these urls. Any ideas?
Joomla 1.6+ is shipped with Redirect Manager (Components > Redirect). It's designed exactly for this purpose (redirecting old urls to new ones).
Joomla 1.6 will include a new component and plugin called Redirect.
Its main function is to provide a mechanism to record 404 "not found"
errors, and to give the Web site owner the ability to redirect those
to another page if desired.
If there are links to your site that result in error 404, these should be already populated in the list when you open the manager - you just have to add new urls to which to redirect to.
References:
A preview of link redirection in Joomla 1.6
You can use the .htaccess rewrite rules for that:
RewriteEngine On
RewriteRule ^(offers/spain/my-offer-name.html)$ index.php?option=com_mycomponent&oid=128 [L]

Drupal 6 site not displaying image links

Having a very strange issue which I hope you can help me with.
No errors in Apache logs. I am running a Drupal6 site, with only a few images that are failing to display.
The site's url is configured as a subdomain, i.e. in sites, directory domain.com.insurance contains all the drupal files, modules, etc.
Using Firebug their relative URLs are set to:
/insurance/files/webfm/auth/insurance_profiles/profile4.jpg
Visiting this file throws a drupal not found page.
The problem here is the URL specified by the developers.
Instead of :
/insurance/files/webfm/auth/insurance_profiles/profile4.jpg
Correct URL is:
/insurance/sites/insurance/files/webfm/auth/insurance_profiles/profile4.jpg
Thats it, hope it helps :)

Redirect from indexed joomla URLS to static URL

I use to have a joomla site with SEF urls which are indexed in google like
example
www.mysite.com/index.php/contactme
i now have a static site and i want to 301 redirect my indexed urls to the the new one
example
www.mysite.com/contact-me.php
i have tried
Redirect 301 /index.php/contactme http://www.mysite.com/contact-me.php
but i get a internal server error. im complete novice at htaccess. i dont have the old joomla site any more only the static one
hope someone can help
Thanks
I think your redirect is correct in the .htaccess. Maybe the problem is that Google didn't crawl your site again since you changed to the static site. Check in Google webmaster tools to make sure and make a manual crawl using the tools to determine HOW Google sees your site NOW. If it shows correctly then you'll just have to give the engine some time to recrawl and reindex your site.
Hope this helps

Resources