VirtueMart Forum

VirtueMart 2 + 3 + 4 => Security (https) / Performance / SEO, SEF, URLs => Topic started by: Pcwolf on July 11, 2013, 11:41:28 AM

Title: Can you hide virtuemart_product_id Url ?
Post by: Pcwolf on July 11, 2013, 11:41:28 AM
Hello,

For my, isn't so professional because people can see the 'Virtuemart' url and i don't want that.
Is there a solution for to to hide it ?

This is when peoples want to search products: http://localhost:62812/index.php/badkamer/view/category/virtuemart_category_id/8
and this is when there click on a item: http://localhost:62812/index.php/badkamer/view/productdetails/virtuemart_product_id/28/virtuemart_category_id/8

,Pcwolf
Title: Re: Can you hide virtuemart_product_id Url ?
Post by: Maxim Pishnyak on July 11, 2013, 21:24:00 PM
You didn't turn on seo links option in Joomla configuration/Virtuemart configuration. Maybe you don't have .htaccess file in web site root.

Also it isn't so professional to construct web shop on localhost.

Virtuemart could work with errors when webmaster use http://localhost instead of http://www.site.com
Title: Re: Can you hide virtuemart_product_id Url ?
Post by: jjk on July 11, 2013, 22:54:15 PM
Concerning ...://localhost... Maybe Pcwolf uses xampp to develop his website, which would be very professional  :)
@Pcwolf
See here: http://docs.joomla.org/Enabling_Search_Engine_Friendly_%28SEF%29_URLs_on_Apache (http://docs.joomla.org/Enabling_Search_Engine_Friendly_%28SEF%29_URLs_on_Apache)
Title: Re: Can you hide virtuemart_product_id Url ?
Post by: Pcwolf on July 12, 2013, 11:01:26 AM
Thank you  ;)

I have enable the seo in vm but now i get this when i click on items: http://localhost:62812/index.php/component/virtuemart/badkamer/bedden/gordijnen-26-detail?Itemid=0
In vm example sites they are nice with: site.com/product/item
not more and thats what i want  :D

This is my .htaccess file in my root website:

## Mod_rewrite in use.

RewriteEngine On

# Make sure the requested URL isn't a file or directory
# Why you'd create a directory called index.php, but best to be sure
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f

# Use a reg-Ex to find URL's where index.php is followed by something.
# If so, create a redirect to whatever followed the slash
RewriteRule ^index.php/(.*)$ /$1 [R=301]

## Begin - Rewrite rules to block out some common exploits.
# If you experience problems on your site block out the operations listed below
# This attempts to block the most common type of exploit `attempts` to Joomla!
#
# Block out any script trying to base64_encode data within the URL.
RewriteCond %{QUERY_STRING} base64_encode[^(]*\([^)]*\) [OR]
# Block out any script that includes a <script> tag in URL.
RewriteCond %{QUERY_STRING} (<|%3C)([^s]*s)+cript.*(>|%3E) [NC,OR]
# Block out any script trying to set a PHP GLOBALS variable via URL.
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
# Block out any script trying to modify a _REQUEST variable via URL.
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
# Return 403 Forbidden header and show the content of the root homepage
RewriteRule .* index.php [F]
#
## End - Rewrite rules to block out some common exploits.

## Begin - Custom redirects
#
# If you need to redirect some pages, or set a canonical non-www to
# www redirect (or vice versa), place that code here. Ensure those
# redirects use the correct RewriteRule syntax and the [R=301,L] flags.
#
## End - Custom redirects

##
# Uncomment following line if your webserver's URL
# is not directly related to physical file paths.
# Update Your Joomla! Directory (just / for root).
##

RewriteBase /

## Begin - Joomla! core SEF Section.
#
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
#
# If the requested path and file is not /index.php and the request
# has not already been internally rewritten to the index.php script
RewriteCond %{REQUEST_URI} !^/index\.php
# and the request is for something within the component folder,
# or for the site root, or for an extensionless URL, or the
# requested URL ends with one of the listed extensions
RewriteCond %{REQUEST_URI} /component/|(/[^.]*|\.(php|html?|feed|pdf|vcf|raw))$ [NC]
# and the requested path and file doesn't directly match a physical file
RewriteCond %{REQUEST_FILENAME} !-f
# and the requested path and file doesn't directly match a physical folder
RewriteCond %{REQUEST_FILENAME} !-d
# internally rewrite the request to the index.php script
RewriteRule .* index.php [L]
#
## End - Joomla! core SEF Section.


I use webmatrix, joomla 2.5
i Enabled the sef settings in joomla and Use URL rewriting but when i use Use URL rewriting then i get a iss 8.0 error when i click on vm products, vm items, all pages.... but not the homepage  ???
Title: Re: Can you hide virtuemart_product_id Url ?
Post by: Maxim Pishnyak on July 12, 2013, 15:06:58 PM
Quote from: Pcwolf on July 12, 2013, 11:01:26 AM
I have enable the seo in vm but now i get this when i click on items: http://localhost:62812/index.php/component/virtuemart/badkamer/bedden/gordijnen-26-detail?Itemid=0
Did you creat menu link to Virtuemart?
Quote from: Pcwolf on July 12, 2013, 11:01:26 AM
I use webmatrix, joomla 2.5
i Enabled the sef settings in joomla and Use URL rewriting but when i use Use URL rewriting then i get a iss 8.0 error when i click on vm products, vm items, all pages.... but not the homepage  ???
Why struggle to make sef works on localhost?
More direct way is to use real shared hosting.
It's not simple for me to imagine web master that hasn't own web site (portfolio/personal blog).
Transfer your project from localhost to a subfolder or a subdomain of your personal website.
Test your prototype in REAL web environment.
Title: Re: Can you hide virtuemart_product_id Url ?
Post by: franzpeter on July 12, 2013, 16:00:42 PM
It should be no problem to use sef url on a localhost like xamp for Windows or MAMP for Mac. If you use ISS the configuration might be slightly different. You may take a look on that:http://docs.joomla.org/Enabling_Search_Engine_Friendly_(SEF)_URLs_on_IIS (http://docs.joomla.org/Enabling_Search_Engine_Friendly_(SEF)_URLs_on_IIS)
Title: Re: Can you hide virtuemart_product_id Url ?
Post by: Pcwolf on July 12, 2013, 16:43:00 PM
Quote from: Maxim Pishnyak on July 12, 2013, 15:06:58 PM
Quote from: Pcwolf on July 12, 2013, 11:01:26 AM
I have enable the seo in vm but now i get this when i click on items: http://localhost:62812/index.php/component/virtuemart/badkamer/bedden/gordijnen-26-detail?Itemid=0
Did you created menu link to Virtuemart?
Quote from: Pcwolf on July 12, 2013, 11:01:26 AM
I use webmatrix, joomla 2.5
i Enabled the sef settings in joomla and Use URL rewriting but when i use Use URL rewriting then i get a iss 8.0 error when i click on vm products, vm items, all pages.... but not the homepage  ???
Why struggle to make sef works on localhost?
More direct way is to use real shared hosting.
It's not simple for me to imagine web master that hasn't own web site (portfolio/personal blog).
Transfer your project from localhost to a subfolder or a subdomain of your personal website.
Test your prototype in REAL web environment.

You mean in Main Menu or just a menu, and choose Menu-itemtype ?
I have choosed for VM view Category and in the right column i choosed already for: Select a category.
So i think al it's perfect in my menu item.

I'm planning to buy a hosting but first i want to test my site without problems.

Thanks!
Title: Re: Can you hide virtuemart_product_id Url ?
Post by: Pcwolf on July 12, 2013, 16:51:07 PM
Quote from: franzpeter on July 12, 2013, 16:00:42 PM
It should be no problem to use sef url on a localhost like xamp for Windows or MAMP for Mac. If you use ISS the configuration might be slightly different. You may take a look on that:http://docs.joomla.org/Enabling_Search_Engine_Friendly_(SEF)_URLs_on_IIS (http://docs.joomla.org/Enabling_Search_Engine_Friendly_(SEF)_URLs_on_IIS)

Yes i know, normal there should be no problems if you running localhost. But i see the problem, i running iis 8.0 and if you want to use url without index.php you will need iis 7.
But i use Microsoft Webmatrix 3 and they automatic installed iis 8. I tried to uninstalled 8 because i already had installed iis 7. But after that i get many errors if i want to start my joomla website on localhost.

All must be work if i running it in a real website  :D

Also Thanks!
Title: Re: Can you hide virtuemart_product_id Url ?
Post by: Maxim Pishnyak on July 12, 2013, 17:12:11 PM
Quote from: Pcwolf on July 12, 2013, 16:43:00 PM
Quote from: Maxim Pishnyak on July 12, 2013, 15:06:58 PM
Did you created menu link to Virtuemart?
... just a menu, and choose Menu-itemtype ?
Right. You need to have menu item to VM Frontpage or better to VM Categories page in most cases.
Menu module where this menu item is situated could be even unpublished.
Quote from: Pcwolf on July 12, 2013, 16:43:00 PM
I'm planning to buy a hosting but first i want to test my site without problems.
What happened with free web hosting services?
Title: Re: Can you hide virtuemart_product_id Url ?
Post by: Pcwolf on July 12, 2013, 17:38:48 PM
Yes, all is enabled. They are nothing happens with the url.

I created everthing new, new menu item, categories, articles.. but they are the same url ???

A free hosting ?
Are you sure, i have only a domain so i need to change the dns servers and thats it. Any solutions ?
Title: Re: Can you hide virtuemart_product_id Url ?
Post by: Maxim Pishnyak on July 12, 2013, 22:31:58 PM
Quote from: Pcwolf on July 12, 2013, 17:38:48 PM
A free hosting ?
Are you sure, i have only a domain so i need to change the dns servers and thats it. Any solutions ?
Yep, I'm sure.
You don't need to use your domain for work.
Subscribe to any suitable free web hosting and use provided by them domain as temporary address for your project.
Probably you will need to check a couple free services, before you find one which will be able to work with Demo of Virtuemart.
But it worth do to this.
Title: Re: Can you hide virtuemart_product_id Url ?
Post by: Pcwolf on July 13, 2013, 09:45:33 AM
Quote from: Maxim Pishnyak on July 12, 2013, 22:31:58 PM
Quote from: Pcwolf on July 12, 2013, 17:38:48 PM
A free hosting ?
Are you sure, i have only a domain so i need to change the dns servers and thats it. Any solutions ?
Yep, I'm sure.
You don't need to use your domain for work.
Subscribe to any suitable free web hosting and use provided by them domain as temporary address for your project.
Probably you will need to check a couple free services, before you find one which will be able to work with Demo of Virtuemart.
But it worth do to this.

Great thanks!

I had no idea for this. Few weeks used localhost but now i can test it on a subdomain.

I will test all, remove the index.php etc..
Title: Re: Can you hide virtuemart_product_id Url ?
Post by: Pcwolf on July 13, 2013, 11:14:07 AM
- The index.php has removed  ;D

But the vm url not. I read this topic http://forum.virtuemart.net/index.php?topic=101098.msg335219#msg335219 (http://forum.virtuemart.net/index.php?topic=101098.msg335219#msg335219) and this: http://paulmason.name/item/search-engine-friendly-sef-urls-for-virtuemart (http://paulmason.name/item/search-engine-friendly-sef-urls-for-virtuemart)
I download the router.php file from the website above. And now i getting this: http://6202.cloudaccess.net/badkamer?view=category&virtuemart_category_id=7 (http://6202.cloudaccess.net/badkamer?view=category&virtuemart_category_id=7)

Also, my test website is http://6202.cloudaccess.net (http://6202.cloudaccess.net) If you click on the menu item Badkamer, then you will see 3 different categories: the url now is: http://6202.cloudaccess.net/badkamer (http://6202.cloudaccess.net/badkamer) that's pretty good but when you click on the categories, articles then you see another url  >:(

My website is ready to go online on real website but only i need to change the url.

Title: Re: Can you hide virtuemart_product_id Url ?
Post by: Maxim Pishnyak on July 13, 2013, 11:30:13 AM
Come on, remove that 3rd party router, and we could continue support you on this forum.
Title: Re: Can you hide virtuemart_product_id Url ?
Post by: Pcwolf on July 13, 2013, 11:43:15 AM
All was removed...

You mean the 3rd party extension on the menu ?
Also i have removed the router.php file.
Title: Re: Can you hide virtuemart_product_id Url ?
Post by: Maxim Pishnyak on July 13, 2013, 12:04:01 PM
It's usually fine to use various 3rd party extensions on the web shop.
But installed 3rd party router.php better must to be removed.

Please post here screen shots of your both Joomla and VM sef settings.
And screen shots of created by you menu items for VM stuff could also help.

Regards.
Title: Re: Can you hide virtuemart_product_id Url ?
Post by: Pcwolf on July 13, 2013, 12:30:25 PM
The only router.php that i can find is in the components/com_virtuemart


The image
http://oi41.tinypic.com/2q2fyty.jpg (http://oi41.tinypic.com/2q2fyty.jpg)
Title: Re: Can you hide virtuemart_product_id Url ?
Post by: Maxim Pishnyak on July 13, 2013, 15:17:29 PM
Strange I thought that you're using the last version of VM. I see 2.0.20b under your avatar picture.
When do you think to try and update you web shop?

It could be issue also with your template. Could you switch to some standard joomla template (to Beez5 for example) and check sef issue again.
Title: Re: Can you hide virtuemart_product_id Url ?
Post by: Pcwolf on July 13, 2013, 17:57:55 PM
OMG!

Only a update has worked  ;D

I need only to remove: component/virtuemart/gordijnen-detail?Itemid=0 (http://component/virtuemart/gordijnen-detail?Itemid=0) the component/virtuemart/ and the ?Itemid=0 at the end.
But when you click on the item then you don't see the category more before was: Badkmaker/Categorie/item

I take a look on the vm settings, categories and items but all was like before the update.

Also thanks!
Title: Re: Can you hide virtuemart_product_id Url ?
Post by: Maxim Pishnyak on July 13, 2013, 21:30:29 PM
You're welcome!

Could you direct to me the specific place where ?Itemid=0 issue happened?
Title: Re: Can you hide virtuemart_product_id Url ?
Post by: Pcwolf on July 14, 2013, 10:25:36 AM
Sure,

In the items: http://6202.cloudaccess.net/component/virtuemart/badkamer/meubels/gordijnen-detail?Itemid=0

But when you click on the link you don't see the item details more, if you see on the categorie meubels: http://6202.cloudaccess.net/badkamer/badkamer/meubels
and if you click on the item they will change to http://6202.cloudaccess.net/component/virtuemart/?Itemid=0
Title: Re: Can you hide virtuemart_product_id Url ?
Post by: Pcwolf on July 14, 2013, 11:23:09 AM
hmmmm.....

Above i choosed for option 1:

(http://i44.tinypic.com/2hfp3j6.png)

But when i choose on the Menu Item Badkamer for option 2 then i get what i want:

site.com/product/Products/item so like badkamer/meubels/gordijnen
and that's what i want  ;D ;D

All works but when you click on the item:

(http://i41.tinypic.com/2cnjxvt.png)

then it redirect you back to badkamer/meubels

Title: Re: Can you hide virtuemart_product_id Url ?
Post by: Pcwolf on July 14, 2013, 16:26:07 PM
whaazaa!!!

All works perfect  ;D
Thanks for the help Maxim Pishnyak  :)

If anyone has this problem too, read this

- First you need to create a product categories in Virtuemart, children product categories:

(http://i40.tinypic.com/2ylvjf4.png)

- Then you need to create a menu item with the Menu Item Type: VirtueMart » VirtueMart Categories Layout.
In the right column: Required Settings choose the category not a children category!!

- If want a children category then create a menu item with the Menu Item Type:  VirtueMart » Category Layout
Down, Parent Item choose where you want the children categorie.
In the right column: Required Settings choose the children category.

(http://i43.tinypic.com/2vkx8j8.png)

Everything should be okay now if not then go to Go to:
Virtuemart > Configuration
Click the Templates tabs
Select the "Show Children Category" check box

Enjoy your shop!