How to create Directory/Folder when using Magento? - magento

We are running magento on our site www.xsmoke.com. The site is international, so we are using "/country code" - e.g.www.xsmoke.com/de/ etc.
Now we would like to install wordpress in one of the languages only and we want the URL to be "xsmoke.com/de/blog".
But i can't create a folder on that location for the wordpress files because of magento.. Does anyone have an idea for a workaround?
Thanks.

I'm not sure how you've set things up but it would be possible to do this by using the technique involving directories and symlinks for multiple websites (rather than have Magento include the store codes in the url). See the below answer on how to do that;
https://magento.stackexchange.com/questions/13171/multiple-country-specific-stores-on-the-same-domain-show-country-selection-firs#answer-13173
And you'd then just install Wordpress in the /de/blog directory. Otherwise you might be better asking another question tagged with .htaccess and ask for a way to do a rewrite that would handle it in the context of Magento's existing rewrites.

Related

Joomla friendly URLs not working after update?

Hi and thanks for reading&answering my question. I am fairly new to Joomla,however I have built a directory website and started to put some content. I have created the standard pages(contact us, privacy etc) and added businesses. I would like SEO friendly URLs so I set Search Engine Friendly URLs, URL Rewriting --YES, and Suffix --No. However, Joomla somehow rewrites my alies and change them. example: mywebsite/bar-and-dinner is displayed now as my website/bar-din-r. I contacted the support of the plugin I use and they told me that I must have had some filters on Joomla that creates such a problem. I tried to purge cache on the website & server still the same. I just updated to Joomla 4.0. Thanks in advance for your help.

Change Joomla 3 page url extension from .html to .htm

I am creating a website using Joomla 3 CMS. I have a requirement from my client that i need to change the existing page url extension from .html to .htm. As this website is redesign of a existing website the old links have .htm extension.
Open ../libraries/cms/router/site.php
Go to line number 144
And change
if ($format = $uri->getVar('format', 'html'))
to
if ($format = $uri->getVar('format', 'htm'))
I hope that helps
If you don't want to edit core files, and that is certainly not advised for sake of future upgrades. Your best solution is using a custom component for managing Joomla's SEF URLs, for example: sh404SEF (Paid) or JoomSEF (Free).
Check out http://extensions.joomla.org/category/site-management/sef for others.
Never ever edit Joomla Core files, otherwise when you upgrade Joomla, all your changes will be gone.
As #Alexxandar said; use SEO/SEF components for your needs. I recommend to use MijoSEF (Free or Paid)
Go to global configuration and remove the l from the suffix.
THis is a Joomla configuration question and a standard joomla configuration (not programming) option.
Now the one thing you will have to worry about is that if there are any old links to the htm pages. FOr this you will probably want to use the built in redirect component. Turn on the redirect plugin and then if you have a small number of pages you can just set up the redirection by hand. If you have more pages you may want to write the sql to create a bunch of redirects. Or you might want to make your own plugin to permanently redirect the old to the new.

*some* magento links pointing to old domain

I have just moved a magento site from one domain to the new one. Steps so far...
Backup the database and restore the database on the new domain. Change the core_config_base table for secure and unsecure base urls
Upload source files
Update the local.xml with new database information
Cleared cache
Now I can go to the site and everything is showing up fine on the new domain. The main navigation is working as it should. When I click on a product, however, it goes to the old domain. Does anyone know why this might be happening?
Can you verify the links when you hover products are correct or in correct consistently? Is old base URL in all links I mean. Also check htaccess file for any directives containing the old domain. Also check to make sure no custom URL rewrites exist in the Magento admin Catalog → URL Rewrite Management .Once you verify htaccess or custom URL rewrites in Magento admin are not causing it, I can suggest other procedures to fix.
Probably your previous developer didn't follow all Magento standards while coding.
My suggestion is download your code and search for strings that equates to your previous domain.Also check in data base, as use of CMS blocks too might result in previous domain links.
Btw make sure you delete all caches
Rm -rf var/cache/*
Verify base URL and secure URL are correct in all scopes via drop down in Magento system configuration.

Add referrer code to url

I need add the url of a wordpress blog a referrer code with this structure:
http://domain/([a-zA-Z]{3}[0-9]{3}/...
The site should work both with and without this code.
If there is I have to use it, store it in session type.
All through plugin so you do not have problems with upgrades or any wordpress plugin.
I also tried to edit the file .htaccess with a custom RewriteRule but nothing.
Ideas? Thanks!
Sorry for bad english!
I think you are trying to reinvent the wheel here, there plugins that gives you affiliate program features so you won't have to worry about url and links.
try some of this plugins: Tag: referral
you can also try this one as it has a good description: Affiliates
With wordpress always check existing plugins when you want to add functionality to your website, there are a lot of plugins that do a lot of things.
Edit: you can create your referal link as domain.com?ref=code and in the website header check for $_GET['ref'] if it exists save the ref in a session variable, if the user gets to register then take the ref value from the session variable. This should work
I opted to install the plugin Rewrite and create rules to manage the referrer.
Thanks anyway!

Avoid Direct Download Link of files

I am using Wordpress and Easy Digital Download plugin to sell digital files.
I have the following how-to questions:
How to avoid a user to see or to use direct download link?
How to create a download link that has an expiration like session?
How to secure a wp-contents/uploads folder?
You might be interested in this:
deny direct access to a folder and file by htaccess
simply put a .htaccess file with the content "deny from all" in the folder.
Then only scripts from your webspace should be able to read files from there.
This should be a first step. You would need a php-file serving the data instead of accessing those files directly.
Eg like this: http://www.kavoir.com/2009/05/php-hide-the-real-file-url-and-provide-download-via-a-php-script.html
(as I am not aware of wordpress plugins, maybe just google for them, this explains how to write those in php - if you cant do that youre pretty much stuck to wordpress plugins)
Nah, Nah, Nah... It's easy man update your plugin, and check your settings...
Step 2. You will see in you plugin settings, that it has 24 hours expiration date download link in forwarded email
"WP Secure Links" is WordPress plugin at codecanyon that lets you create a secure link to downloadable files.
http://codecanyon.net/item/wp-secure-links/4418678
http://sixthlife.net/product/wp-secure-links/
for securing the uploads folder needs some good .htaccess work
check the comments section of this, its explained
Still relevant in 2020 so I have written a small plugin that enables secure and temporary downloads in Wordpress:
WP DISPATCHER
It is free and simple. Check it out :)

Resources