How to redirect dynamic URLs to a static url? - url

I am running my site on Apache Sever with Joomla CMS. I need to re-write a dynamic url to keyword rich url.
I am new to url re-writing, I have been trying to solve this, but unable to succeed in this. In the website, i have used the keyword rich url for navigation, but i found this url in yahoo.. Don't know from were this url is coming...
I have the url as www.example.com/keyword-rich-url.html, but other dynamic url is also being indexed by yahoo..
The dynamic url is www.example.com/index.php?option=com_content&view=category&layout=blog&id=61&Itemid=92
I want to re-write it to www.example.com/keyword-rich-url.html and redirect this dynamic url to the url which is used in the website itself, i.e http://www.example.com/keyword-rich-url.html
I tried this code
RewriteRule ^index.php?option=com_content&view=category&layout=blog&id=61&Itemid=92$ http://www.example.com/keyword-rich-url.html [R=301,L]
Any suggestions?

Before posting a question, do your own research and read Joomla documentation.
Check "Global configuration" section in Joomla Administration. There are options for SEO rewriting. Set them properly and make sure you rename htaccess.txt to .htaccess in the web root of your Joomla installation.

Related

How to handle links that don't start with http, https in nextjs Link component

I am trying to make nextjs Link component to redirect correctly to a website that don't have a http, https in it i am storing links in database based on what user writes and some of them don't inclue http, https but for some reason the Link component appends these links to my current website url for example:
google.com will redirect to mywebsite.com/google.com
any possible way to resolve this issue
i have tried searching online with no luck
If I am on a URL such as:
http://example/
And I write a link like this:
<a href="foo" />hi</a>
Then clicking the link will go to:
http://example/foo
So if your link look like:
<a href="google.com" />hi</a>
Then the expected behavior is for that link to go to:
http://example/google.com
So this is all exactly as expected. If you have links stored in the database that were supposed to include https://, then you need to add that before writing your links.

Umbraco URL issue with Vorto

I am using vorto plugin in my Umbraco 7 application to achieve the multilingual capability.
I mentioned the URL in hostname as 'localhost/clientname/en'.
Whenever I open login page the URL which is getting form is 'http://localhost/clientname/en/login'.
This is the structure of vorto URL writing.
But can I achieve it like 'http://localhost/clientname/login/en' ???
I want language names at the end of the URL, not in between.
Is it possible ?
Please help....i am badly stuck in my project task !
It sounds like you need a custom URL provider, setting the domain to 'localhost/clientname/en' will mean that the URLs will always get added AFTER the language part as the host is always the first part of the URL.
Have a look at this article on URL providers and content finders: https://24days.in/umbraco-cms/2014/urlprovider-and-contentfinder/ it's quite old, but it should still work. That should give you an idea of how to make it work. Basically you want the URL provider to append the language to the end of the URL, and the content finder to strip the language from the end and then find the actual content. You can also then set the language of the current thread in the content finder so that Vorto and Umbraco are using the correct language based on the URL.

Rewrite rules for asp site with multiple string values

I am new to rewrite tools and hence posting question here.
We are using ASP site with IIS 7 Url rewrite 2.0. We are getting an issue where rules are not working for a specific type of pages.
We have two link one is from the oringal web site what ever it generating and other one which we have mentioned in the pages which will convert it to some data I am posting both link which was generating for the same items.
Pleas suggest what will be the rule to print this on the site address bar.
Actual link : http://example.com/itemMatrix.asp?GroupCode=291&MatrixType=1
New link by asp code: http://example.com/291_sikaflex-291-10oz_group.htm
So we need to print the new link in the address bar.
We tried this rule and it did not worked.
RewriteRule ^/([^_]+)_(.*).htm$ /itemMatrix.asp?ic=$1 [L,I]
RewriteRule ^/([^_]+)_(.*).htm$ /itemMatrix.asp?ic=$1&$3 [L,I]
Thanks
~John

How to Reorder Language Parameter In URL using URL Rewrite

We have a Ruby On Rails application on parent folder and a Wordpress Multisite hosted in a subfolder named Blog. Hosting is provided by Azure and we are using IIS.
On the Ruby On Rails app an example url is below:
http://sitename.azurewebsites.net/{language-parameter}/card.html
Note that language parameter e.g. tr comes first.
Wordpress Multisite contains sites with each site has it's own url with language parameter only.
For example the Turkish site's homepage url is
https://wxtemp.azurewebsites.net/blog/tr/
and a sample post url is
http://sitename.azurewebsites.net/blog/tr/{post-slug}/
Notice that language parameter tr comes after /blog/ directory. Although we host Ruby on Rails app on / parent folder, can we customize its web.config file and add some kind of URL rewrite rule to handle changes, so browser address bar displays Wordpress links as
http://sitename.azurewebsites.net/tr/blog/{post-slug}/
and redirects visitors to this url if they are coming from:
http://sitename.azurewebsites.net/blog/tr/{post-slug}/
We want to have same approach for urls with language parameters of other languages we use as well. Parameters we use are de, es, fr, it, ms, ar etc... So I think what we need is a rule with a regex pattern.

joomla link on custom module?

Hi I am new in joomla and have a question about href tag on custom module.
record1
I have this on my view file and how can i give a link on this href?
the link must be support while i change the url type suppose seo friendly urls by global configuration. I have no idea about it. is link from database or statically? and how?
Take a look at JRoute, simple way to write Joomla URLs. Your urls will be rewritten automatically if you use Joomla SEF urls or 3rd party SEF components like sh404SEF.

Resources