I need some HTACCESS help (Magento)
-
Hi Guys,
I need some help on this htaccess issue in Magneto.
So here is what I am trying to do:
I wanted to change mysite.com/index.php/etc to mysite.com/etc
so I turned on the web friend URLS.
That did that, BUT there are still two versions of every page on the site.
www.mysite.com/etc and mysite.com/index.php/etc
So that isn't good for SEO.
So then I applied a 301 matching redirect, RedirectMatch 301 /index.php/(.*) http://www.mysite.com/$1
That solved that problem.
But now I am not able to log into the admin.
It is mysite.com/index.php/pg45admin. It should redirect to mysite.com/pg45admin but the page just hangs.... It goes into a continuous loop.
I tired using the custom URL and then the site crashed and I had to redo it.
So what do I need to do for this to work?
-
Oh my goodness Dave,
I just saw your question and then noticed the date you posted!
Do you still need help with your question, or have you resolved the problem? (I really hope so)
If not, let us know.
Sha
-
Yes, that is what I am looking for.
-
In that case you need the couple lines of htaccess code to redirect any index.php page to it's equivalent. I am not a regex/htaccess pro and do not know the code for it off-hand.
-
Hi Ryan,
Thanks for the response, but I had already turned on web friendly URLs. All that did was removed the index.php from the URL. Both URL's stlll exist.
Before web friendly URL's it was like this:
mysite.com.index.php/etc/etc
after
Since both URL's exist, I just want to 301 redirect any index.php URL to the URL without it.
I have not found any plugin to do what I am looking to do.
-
I have no experience with Magneto, but I have always been able to configure friendly URLs on any system.
If I was in your situation I would do the following:
1. rename your htacess file to .htaccess.old (basically this is the same as deleting it but you would still retain a copy)
2. google "Magento friendly URLs" and follow the guides. I found a few:
http://kb.siteground.com/article/Enable_Friendly_URLs_in_Magento.html
At worst, there are a few plugins which do what you are after
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
What rich snippet etc do I need for this
I attach a screenshot after searching "Mashable". Would appreciate a pointer in the right direction to add this for my site. 71VZEJX
Technical SEO | | Jonathan19790 -
Need help with home page on site
Hello! Thanks for reading in advance! I've got a relatively old site (12 year old domain) that has experienced a drop in rankings specifically for our home page. Some of the key terms that I'd assume we would rank well for are: "expedite us passport" According to SEOMOZ, our on page optimization receives a C for the termr. also, the root domain and page have decent links, etc. However; looking at Google (logged out and in incognito mode in chrome), a page on our site http://www.passportsandvisas.com/passport/index.asp ranks well and our HOME page isn't listed in the top 50 or 100. THis is the case for a lot of keywords we used to rank well for. I would have thought our home page would have at least outranked an internal page. Any thoughts would be very, very helpful!
Technical SEO | | santiago230 -
Please help me critique my friends site
Hi All, I've regularly helped others on this forum when they've asked for tips on how to improve a specific site's SEO. Now I'm asking for the favour in return 🙂 My friend has come to me with a site (http://www.swishplastic.com.au) and asked me to help with SEO and on-page optimisation. I've got a few of my own ideas but there may be a few key things I'm overlooking. If anyone could give a few pointers, it would be much appreciated! Thanks!
Technical SEO | | bradkrussell0 -
Help needed regarding managing client expectations - tricky situation
I will try to explain the scenario as quickly as possible and my hope is that someone can share their opinion on how they would move forward. I was introduced to a local business owner who said he wanted help with SEO. Upon looking at his current online marketing, I saw he had 2 current sites promoting the same local business (martial arts instruction / classes). Why he had two sites? He said it made it easier for him to dominate in Google. Red Flag #1. Upon doing a quick site audit, I found a ton of problems with the existing site. Black text on a black background, keyword stuffing in title tags, non-canonicalization, no xml sitemap, no Google analytics installed...on and on. In addition, the site did not really have a good look to it graphically. I told him that I recommend a fresh new site using Wordpress and that we should build the content with the focus on explaining the benefits of the classes. He agreed and we began development of a new Wordpress site from the ground up. We built a sitemap, wireframe, nice design, etc. The site looks much better and we got rid of a lot of the technical problems with the site. The problem is this: Even though the new site is technically better based on On Page analysis, it is not showing up anywhere in the Top for localized keywords. The site has been live for about 2 1/2 months (March 1). I made the mistake of telling him that in a lot of cases in the past, I was able to build a new site for other clients that would rank well for localized searches based on On Page optimization alone. This is not happening for him with the new site. The new domain is relatively new (less than a year old) and has no links at all at this point. I recommended that we do a 301 redirect from his existing domain to the new one but he is skeptical and I almost can't blame him. The client is not paying me to do any SEO. The contract was to build a new site that would be built with best SEO On Page practices (Title Tags, Header Tags, Meta Desc., XML Sitemap, canonicalization, etc.) I hesitate to post the links to his existing site and the new one we built but I can see where that may shed some more light on the subject. If interested in taking a look, please send me a message. I guess the two questions are this: 1. Is it reasonable for a site to rank well for a localized non-competitive term based on A scores of on page analysis? 2. What harm or foul is there in doing a 301 redirect from the old domain to the new one and then reverting back if he decides that the move hurt his rankings more than helped? Thanks.
Technical SEO | | bluelynxmarketing0 -
Duplicate index.php/webpage pages on website. Help needed!
Hi Guys, Having a really frustrating problem with our website. It is a Joomla 1.7 site and we have some duplicate page issues. What is happening is that we have a webpage, lets say domain.com/webpage1 and then we also have domain.com/index.php/webpage1. Google is seeing these as duplicate pages and is causing me some real SEO problems. I have tried setting up a 301 redirect but it wn't let me redirect /index.php/webpage1 to /webpage1. Anyone have any ideas or plugins that can be used to sort this out? Any help will be really appreciated! Matt.
Technical SEO | | MatthewBarby0 -
Converting files from .html to .php or editing .htaccess file
Good day all, I have a bunch of files that are .html and I want to add some .php to them. It seems my 2 options are Convert .html to .php and 301 redirect or add this line of code to my .htaccess file and keep all files that are .html as .html AddType application/x-httpd-php .html My gut is that the 2nd way is better so as not alter any SEO rankings, but wanted to see if anybody had any experience with this line of code in their .htaccess file as definitely don't wan to mess up my entire site 🙂 Thanks for any help! John
Technical SEO | | JohnHerrigel0 -
Link Volume - calculate what you need?
Hi everyone, an interesting question here. How do you determien what link volume you should try and get into your website? What analysis do you do to determine the number of links you feel is right to go into a back-link profiel every month? obviously there is no magic number but its an interesting question to know what others do. Obviously you don't want to build too many or too little. If you have been penalised for bad links in the past and are now back on track - how do you calculate the volume? Do you take links dropping out into consideration?
Technical SEO | | pauledwards0 -
Help with steps to take when fixing cannonical url structure?
I would like to 301 redirect all the variations of my site to a single url but would like some clarification on some issues. I have always been confused about how to handle cannonicalization and hopefully this can clear it up for me and others. This particular site is about 1 year old and gets approximately 15k uniques a month in a great niche. I want to make sure I do this correctly as to not hurt my existing rankings which are quite good. Here is is what I am unsure about. Basically I should pick the best url structure to redirect all the others to correct? What determines what url is best to redirect all the rest to? is it www.domain.com, http://domain.com or http://www.domain.com? Is the best one to redirect to always standard and something I should set up at the beginning of my site? Or is picking the best url to redirect to based on what url starts to rank in google and you then use that one? Should I be going through each of my rankings and seeing what url is ranking in google for each page? On this particular site ALL of my urls in google have no www. or http but instead show up in the SE as domain.com or domain.com/inner-page/html. In that case what do I do? I know the slow way to do redirects. I use my hostgator account and do it in cpanel and do it one by one. Is there a faster way where I can go and make lots of changes at once? Maybe I can choose all the variations and put in the one I want them all to redirect to? After I figure the above out is fixing all of this as simple as redirecting ALL variations to the one I will use moving forward for each page on my site? Then I am done? Thanks again for the help! Jake
Technical SEO | | PEnterprises0