Joomla 2.5 url shows two url with index.php and without - joomla

my url is http://www.clippingpathoutsource.com and it works fine but when I click to the logo of the page then the url shows http://www.clippingpathoutsource.com/index.php
Could anyone please help me?

it is difficult to identify the problem without looking at the code in the template file...
check the following:
1) In Template check index.php for below block of code
<div class="logoArea">
<a href="/index.php">
2) Instead of "/index.php" in the href attribute of the a tag put your domain name.

Related

Image isn't visible in my site

I've just added a simple code (<img src="images/2.jpg"/>) in my WordPress website. But it's not working. Check it out
Please help me to solve the issue.
Try add leading slash to your image path to start at the root directory instead of your current directory where your code is located:
<img src="/images/2.jpg"/>
most likely the path is incorrect. images is not immediate directory to your current page directory.
usually in wordpress images are in wp-content/uploads/2017/05/%some_image.jpg%
you are using <img src="path"/> you can solve this issue by adding the url of the image like ‪C:\Users\Hitesh Kumar\Desktop\xyz.jpg.
but i know that you are using wordpress so you can add the image by its url like <img src="www.site_name/image.jpg"/>
hope it will help
Need to add this code (<?php echo get_template_directory_uri();?>) to make it dynamic.

Magento - Checkout page not loading https URL for catalogsearch

I have just set up a Magento store and eveything is working fine, except for a problem in the catalog search URL.
When I go to the checkout page, everything is loaded in HTTPS, except for the catalog search URL, which makes chrome give a warning saying that there's mixed content in the page. When I check the source code, it says:
<form id="search_mini_form" action="http://XXXX/catalogsearch/result/" method="get">
But that only happens when the user is not logged in (or a first time customer). Once the user is logged in, the URL is loaded properly:
<form id="search_mini_form" action="https://XXXX/catalogsearch/result/" method="get">
Any idea on why this could be happening?
Thanks!
I know it's not the complete solution, and I have no idea why this is happening also on my store - but a temporary "patch" would be to open:
app/design/frontend/fogento/default/template/catalogsearch/form.mini.phtml
and manually modify the first line of the form element to use the secure url including https.
For example:
<form id="search_mini_form" action="https://www.yoursite.com/catalogsearch/result/" method="get">
This will give you the green address bar in chrome.

How to redirect the visitors to another site in Middleman?

Redirecting to another site was very easy in PHP. If they wanted to redirect visitors from "www.yoursite.com/news" to "www.bbc.com"...all I had to do was make the "news" folder and create an index.php file in it and add this line:
<?php
header("Location: http://www.bbc.com/");
?>
And I was done! But I recently started working on a project written in Ruby, and having trouble to figure out how to achieve this simple task :<
This might be a very silly question, but any help will be greatly appreciated!!
UPDATE:
So found out that this project is using static site generator Middleman to build the site, that's why there is no routes.rb file. It only has config.rb. Can anyone please help me to figure out how to redirect in middleman?
2nd UPDATE:
Looks like because of Middleman, this redirecting isn't possible that simply. So I am asking this (very dumb) question: How to redirect URL in Javascript or jQuery
So finally found an easy solution to my problem :)
In order to redirect www.yoursite.com/news to www.bbc.com, first I created a news.html.erb file under my source folder (where you have your index.html.erb file). And in that file I added the following lines and wallaaahhhh!
<% content_for :body_content do %>
<script type="text/javascript">
// Javascript URL redirection
window.location.replace("http://www.bbc.com/");
</script>
<noscript>
// Using HTML refresh meta tag as a fail back in case the user has javascript disabled
<meta http-equiv="refresh" content="0;URL=http://www.bbc.com/">
</noscript>
<% end %>
One thing I should mention here is that most sites suggested
using window.location.href, because replace() does not put the originating page in the session history, meaning the user won’t get stuck in a never-ending back-button process.
But in my case window.location.href wasn't doing the trick :(
You'll need to setup a custom route in routes.rb:
get "/news" => redirect("http://bbc.com")

Private Joomla 2.5 K2 items redirects back to homepage instead of origin link after login

I am gonna try my best to describe our problem. Hopefully someone way smarter than us can figure this out. One of our Joomla sites has some content that requires login, simple enough right? The normal login functionality works great. Once logged in we could see the locked down content. But lets say we have a direct link to a "locked" page, once logged in, the page redirects to the homepage (index.php).
Natively Joomla 2.5 should retain the origin link, and redirects to that link, not back to index.php. So if my link was homepage.com/k2item1, after login it should go to k2item1 not index.php. I have tried turning off all modules and plugins just in case something is overriding the native login functionality from links. I have checked the .htaccess file for redirects. I have tried both settings in SEO settings "Use URL rewriting", Yes/NO doesn't matter. I have tried renaming the override folder (html) in our template folder, so no overrides should happen. Nothing. The link still redirects back to index.php. I have even tried printing out the form/user object to see if the origin link was there, aka "return", and the link is in there, but after login, still index.php instead of the string "return". Any ideas will be greatly appreciated. Maybe there are plugins out there that would help ensure links do not redirect to home page?
Override the component: mod_k2_user/login.php and edit the hidden input name "return".
<input type="hidden" name="return" value="<?php echo base64_encode(JURI::current()) ?>" />

Change URL in address bar but keep on same page

Is it possible to rewrite a url so that the page stays the same and the url itself is chanaged ?
E.G.:
I have a page at www.example.com/sales
I want this url to appear in the address bar as www.example.com/sales_and_repairs
I am NOT trying to redirect a page at www.example.com/sales to ANOTHER page at www.example.com/sales_and_repairs ....There is only ONE page - it is just the URL I am trying to change so that if a person types in www.example.com/sales, they will go to that page but the URL in the Address bar will change to show as www.example.com/sales_and_repairs
Is this possible with rewrite rules ? Anytjhing I have looked up appears to suggest that you have to be redirecting to a second page - but that is not what I want to do - I just want to change the actual URL.
Any advice please ??
If you want to redirect www.example.com/sales_and_repairs to www.example.com/sales permanently you can do it with an .htaccess file.
First of all, you'll have to enable mod_rewrite in apache.
Then add the following to your .htaccess file :
Options +FollowSymlinks
RewriteEngine on
Rewriterule ^http://www\.example\.com/sales_and_repairs$ http://www\.example\.com/sales [R=301,NC,L]
This method allow you to have only one file behind the two urls.
However if you want to modify the url after a user's action, you can do it with the answer given by Sparda above.
Seems you can achieve this with javascript :
location.hash = 'newurl';
But this will add an anchor to the url.
Some earlier features of html5 can do this but are not really supported yet :
history.pushState(data, 'title', 'newurl');

Resources