![]() |
Clean Url first letter
Hello,
How do i change the link http://store.com/Product-Name with http://store.com/product-name I've tried this method but didn't work |
Re: Clean Url first letter
Of course you can manually change them to lower case. If you want the change to be automatic when you create a new product you will need to use JavaScript.
Personally, I don't see any seo benefit or hindrance using uppercase. Can you explain what you are trying to accomplish exactly? Are you wanting lowercase to be automatic when creating a URL, or are you wanting to rewrite all your URLS to lowercase? http://www.seoverflow.com/redirect-uppercase-urls-to-lowercase/ |
Re: Clean Url first letter
First of all thank you for your response.
I know i can manually change them but i need to know if is there any solution to make them auto with lowercase. I want the lowercase to be automatic when creating a URL and i want to rewrite all URLS to all products that i already have in shop. How can i do that? :) |
Re: Clean Url first letter
Here is a way to do it with .htaccess or httpd.conf:
http://www.askapache.com/htaccess/rewrite-uppercase-lowercase.html You could write a mysql query that would change all the entries in the database using the Lower() function: http://dev.mysql.com/doc/refman/5.0/en/string-functions.html#function_lower To get it to be lowercase from now on automatically: http://stackoverflow.com/questions/154862/convert-javascript-string-to-be-all-lower-case Edit /common_files/js/check_clean_url.js Look at line 69 and find: to_field.value = from_field.value.replace(/[\&]/g, '-and-').replace(/[^a-zA-Z0-9._-]/g, '-').replace(/[-]+/g, '-').replace(/-$/, ''); Change it to: to_field.value = from_field.value.replace(/[\&]/g, '-and-').replace(/[^a-zA-Z0-9._-]/g, '-').replace(/[-]+/g, '-').replace(/-$/, '').toLowerCase();; All we have done is added ".toLowerCase();" to the end of the JavaScript expression. This will work for all new products you create that don't have a clean url value. Or if you remove the Clean URL and make some change to the product name than it will rewrite it for you. |
Re: Clean Url first letter
This :
to_field.value = from_field.value.replace(/[\&]/g, '-and-').replace(/[^a-zA-Z0-9._-]/g, '-').replace(/[-]+/g, '-').replace(/-$/, '').toLowerCase();; works for me :) Thank you! |
Re: Clean Url first letter
This is XC bug to me, I am sure QT will call it improvement :)
It has been like this since Clean URLs was first introduced. I am not sure why it was decided to just copy the words from the title and not make them all lowercase to begin with. The js solution above will get you by only when you create product or modify it in admin. If you are importing products or do auto populate Clean URLs form maintenance page this will not work. The php script involved still outputs the words as they are - so capital letters.... You need to change the outcome in include/func/func.clean_url.php as well |
Re: Clean Url first letter
Quote:
how to do then? |
Re: Clean Url first letter
|
Re: Clean Url first letter
Quote:
That other thread is proof that this forum needs better search capabilities. Otherwise you would only have 5,000 posts. :-) |
Re: Clean Url first letter
Oh man I didn't even noticed... this feels like an anniversary :)
|
Re: Clean Url first letter
You have achieved Veteran status! OMG I forgot that level existed! The highest rank I have seen in a while is X-guru, Balinor is the only one I know of that is Veteran.
|
All times are GMT -8. The time now is 05:35 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.