URL of Category page in Magento changed to /shop-3.html how to change it back to /shop.html - html

After I changed the URL key in Category management in Magento from "shop" to "webshop"and later changed it back to "shop", the url of the category page now shows up like /shop-3.html Is there a way to go back to the original /shop.html?
FOUND THE SOLUTION: http://www.youtube.com/watch?feature=player_embedded&v=8xttr_ILd6A
Sometimes when you make changes to your products, or enable a certain extension, Magento might start to rewrite all your URLs to include a suffix "-1" or some other number. Within the URL Rewrites, Magento differentiates between System URLs and Custom URLs. If the System URLs are broken like this, you should not fix this by adding new Custom URLs.
Instead, open up phpMyAdmin, create a backup of your Magento database, and flush the Magento table core_url_rewrite (so that it becomes totally empty). Immediately afterwards, refresh the Catalog Url Rewrites under Index Management. This will regenerate all System URLs.

you can edit url write,i think there will be entry like /shop-3.html just change it is you want
http://www.magentocommerce.com/wiki/modules_reference/english/mage_adminhtml/urlrewrite/index
and also refer
http://www.magentocommerce.com/knowledge-base/entry/what-url-rewrites-are-and-why-they-are-important
hope this will sure help you.

Simple answer
just delete url related to shop (custom and system generated), than run re-indexing it will work

Related

Subdomain of website for Github pages project

I have a Github project, github.com/jeti/matrix, and I set up a "Github pages" site for the project so that it is accessible here jeti.github.io/matrix/.
That is all configurable through Github.
Now, I would like to add a subdomain of my personal website so that the website is accessible via the subdomain matrix.jeti.io of my website jeti.io.
I am just really confused how to do that because the documentation don't seem to show how to redirect a project page to a subdomain. I have tried a few permutations of what I think should be the correct inputs, but because these DNS changes take so long to propagate, it is really hard to test.
Specifically, I would like to know what value to enter into Github as the Custom domain (it seems to me that this should simply be the subdomain matrix.jeti.io, but I am not sure, so I have left this blank):
Then I also need to create the subdomain. I bought the domain through OVH, and they provide a few options for adding a DNS entry:
My understanding is that I need to add 2 apex records. I did that already:
What is unclear to me is whether I also need to add a CNAME entry. This is what the form looks like when I try to add a CNAME entry:
So in recap:
I did not specify the Custom Domain on the Github site.
I created the 2 apex records shown above.
I did not create a CNAME entry.
Please tell me which of these steps needs to be changed and how to modify it.
After more trial and error, the answer seems to be
The Github custom domain should indeed be matrix.jeti.io
I did not need the apex records. In fact, Github emailed me discouraging it. So I deleted the apex records.
In OVH, I added a DNS CNAME entry like this:
The thing that was confusing me is that I thought that the CNAME entry needed to have a link to the original Github pages WITH the project name jeti.github.io/matrix. That was wrong. The target is simply jeti.github.io. (Note the period on the end).

Website Images dont get loaded, URL looks cryptic

So on a website Iam working on some images dont get loaded.
The console says: Failed to load resource: net::ERR_NAME_NOT_RESOLVED
and then a link like that:
http://s234127563.online.de/wp-content/uploads/2014/04/myimage.png
If I change the first part of the URL http://s234127563.online.de/ to the actual URL http://example.org/ the images get shown
Does anybody know what this problem is about? Maybe some DNS thing or something. I tried different browsers and to renew my ip address and flush dns etc. but nothing changed
Looks like a mismatch in your database. WordPress stores your base URL to generate permanent links etc.
Change the URL stored in WordPress. There’s a page dedicated to that on the WordPress Codex. Hardcoding the URL in wp-config is most reliable, but perhaps not most desired.
The URLs are saved in posts etc, so you may have to update those. The Velvet Blues Update URLs plugin can do this for you.
Manually update non-default fields (theme options, custom fields, etc)
If none of the above works... are you using a CDN of some sort?
Check your database. In the wp_options table there should be 2 rows, one called siteurl and the other one called home. Make sure both are set to be your domain name, so http://example.org/
Wordpress sets this URL at the start during installation, and if you for example had this URL set to something different before, in case of a migration to a different domain name or something else, it can differ from the domain name the website is currently being shown on.

Wordpress - ftp'd site/exported database to localhost, localhost images still point to .com, why?

I FTP'd over the entire wordpress site and exported the Database and got it running on my localhost throught WAMP, but for some reason the links and folder are still pointing towards it's .com, and a 404 error comes up as well.
I suspect it has something to do with .htaccess but I'm not sure.. Can someone steer me in the right direction?
Did you update WordPress Address (URL) and Site Address (URL) under General > Settings?
They might still point to old domain.
Transferring the site over FTP to your local machine is the same as "moving" it to a new domain. Wordpress provides specific instructions for such a move which you can find #
http://codex.wordpress.org/Moving_WordPress
When Your Domain Name or URLs Change
When your domain name or URLs change - i.e. from http://example.com/blog to http://example.com, or http://example.com to http://newexample.com - there are additional concerns. The files and database can be moved, however references to the old domain name or location will remain in the database, and that can cause issues with links or theme display.
If you do a search and replace on your entire database to change the URLs, you can cause issues with data serialization, due to the fact that some themes and widgets store values with the length of your URL marked. When this changes, things break. To avoid that serialization issue, you have two options:
Only perform a search and replace on the wp_posts table.
Use the Search and Replace for WordPress Databases Script to safely change all instances. ( If you are a developer, use this option. It is a one step process as opposed to the 15-step procedure below )

Why won't AdvancedNewFile plugin show me the folder structure in sidebar?

I installed the plugin, but when I save a file within a folder like css/style.css it won't appear in its folder structure in the sidebar.
Also, how do I set the 'global' folder location for this project? Or how to change to another project for later?
Maybe I'm missing something the tutor on tuts+ used, so any tips on additional plugins to help with these tasks will be appreciated.
I'll work to address your questions here, but I recommend creating an issue, if there really is one, on the GitHub Page (I'm also the current maintainer of the plugin and I would probably respond faster to issues on the page because I also get email notification from those).
With that out of the way, I'll start on the questions. After you create the file, can you verify it is created?That is, after you create it through the plugin, can you see the file exists outside of Sublime Text? If so, can you give me more information about your setup so I can try to recreate the issue? Note it may also be a bug within the editor itself, but for now let's assume it's not. When you are creating the file, there should be an absolute path in the status bar below the input window. It should say something along the lines of Creating file at ...
There are a number of configurations for you to manage, if you so choose. Details about these can be read about here. These can be setup as global preferences (navigate to Preferences -> Package Settings -> AdvancedNewFile -> Settings - User). This will create a file for you to place your settings. You may look at the README or the default settings to see a list of valid keys. You may also setup project specific settings, which are explained here.
The AdvancedNewFile plugin works, by default, by using the folders in the window it was activated. So by opening a new project/window, you will have a new set of top level folders when creating files. If you did not have any folders open, it will fall back to the home directory.
Let me know if I can clarify anything. I'll try to check back here, but again, creating an issue for any problems would be fastest way to notify me.

web-development: how do you usually handle the "under costruction" page"?

I was wondering what's the best way to switch a website to a temporary "under costruction" page and switch it back to the new version.
For example, in a website, my customer decided to switch from Joomla to Drupal and I had to create a subfolder for the new CMS, and then move all the content to the root folder.
1) Moving all the content back to the root folder always create some problems with file permissions, links, etc...
2) Creating a rewrite rule in .htaccess or forward with php is not a solution because another url is shown including the top folder.
3) Many host services do not allow to change the root directory, so this is not an option since I don't have access to apache config file.
Thanks
Update: I can maybe forward only the domain (i.e. www.example.com) and leave the ip on the root folder (i.e. 123.24.214.22), so the access is finally different for me and other people? Can I do this in .htaccess file ?
One thing to consider is you don't want search engines to cache your under construction page - and you also don't want them to drop your homepage from the search index either (Hence just adding a "noindex" meta tag isn't the perfect solution).
A good way to deal with this is do a 302 redirect (temporarily moved) from your homepage to your under construction page - that way the search engine does not cache your homepage as an under construction page, does not index your under construction page (assuming it has a NOINDEX meta tag), and does not drop your homepage from the search index either.
One way would be the use of an include on your template page.
When you want the construction page to show, you set a redirect in the include to take all traffic to the construction page.
When you are done your remove the redirect.
What about hijacking your index.php file?
Something simple, along the lines of
<?php
if (SITE_OFFLINE)
include 'under_construction.html';
else
//normal content of your index page
?>
where you would naturally define SITE_OFFLINE in an appropriate place for your needs.
What I did when I used PHP for websites was to configure Apache to direct all requests to a front controller. You then would have full access to all requests no matter where they are pointing to. Then in your front controller (PHP file, static html file, etc.), you would do whatever you need to do there.
I believe you need to configure pathinfo in Apache and some other settings, it has been about 3 years since I have used that approach. But, this approach is also good for developing your own CMS or application so that you have full control over security.
You have to do something similar to this:
http://www.phpwact.org/pattern/front_controller
I am looking for more details, I know my configuration had more to it than that.
This is part of what I'm looking for too:
http://httpd.apache.org/docs/2.0/mod/core.html
Enabling path_info passes path information to the script, so all requests now go through a single point of entry. Let me find my configuration, I know vaguely how this works, but I'm sure it looks like a lot of hand waving.
Also, keep in mind that because all requests are going through this single PHP file, you are responsible for serving images, JavaScript, CSS, etc. So, if a requests is coming in for /css/default.css, that will go through your php script (index.php, most likely), then you'll need to determine how to handle the request. Serving static files is trivial, but it is a little more work.
If you don't want to go that route, you could possibly do something with mod_rewrite so that it only looks for .html, .htm pages or however you have your site configured. For me, I don't do extensions, so that made my regex a little more difficult. I also wanted to secure access to all files. The path_info was the solution for me, but if you don't need that granularity, then writing a front controller might be a bit too much work.
Walter