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
-
Need help with list schema!
Hi all, I am trying out list schema on my site, but in Google's structured data testing tool I'm having an issue with the URL section. Whenever I have the same URL for each position is says that duplicate URLs aren't allowed, then when I have different URLs it says that they all have to be the same URL. Does anyone have any pointers that can help make my list schema error free!? Heres my schema:
Technical SEO | | Saba.Elahi.M.0 -
Magento Category Suffix - redirect issue
Hi All, Just launched a new Magento store & set the category suffix to blank & not .html or / So the desired url is https://www.example.com/category-1 But I am seeing a 301 redirect being implemented: https://www.example.com/category-1/ redirect to: https://www.example.com/category-1 I cant see this is the list of 301 redirects within the redirect panel in Magento but Moz & another redirect checker is picking it up. I am missing a setting or something ? Many Thanks,
Technical SEO | | PaddyM556
Pat0 -
Htaccess noob
Hi all, I discovered that a site I'm working on has some pages from their old site that are stil live and getting traffic. I would like to add redirects for them to the .htaccess file. Unfortunately, I have zero experience writing or editing .htaccess files. Here is the existing .htaccess file: BEGIN WPSuperCache END WPSuperCache BEGIN WordPress <ifmodule mod_rewrite.c="">RewriteEngine On
Technical SEO | | rich.owings
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]</ifmodule> END WordPress And here are a few sample lines that I need to add: Redirect 301 /files/John-Doe.html /staff/
Redirect 301 /files/Jane-Smith.html /staff/
Redirect 301 /files/contact.html /contact/ So my question is, should I place those lines immediately after Rewrite engine on, or just before the closing IfModule tag or...? There is no consistent pattern that would allow for a single rule or two. Oh, and I will backup the current .htaccess file first! Many thanks for any help anyone can offer.0 -
Beginner - needs to better understand rel=canonical. What is the best resource?
I'm pretty sure I have pages/posts that are competing on the same keyword and would like to fix it. What is the best beginners guide to understanding rel=canonical and how to use it to improve our SEO?
Technical SEO | | JonnyBird10 -
Blog is outranking my root domain - Why and Help
I have an odd question concerning SERP rankings on Google along with PageRank and Google Trust. I have a website created in HTML with a WP blog created in a sub-directory. I am finding that the blog is getting relatively good rankings yet it seems the root domain is not getting any of the rank or trust passed onto it as it consistently is outranked by the blog. In fact, for a few of our targeted keywords the root domain does not even show up at all, yet the blog does. Our blog is #2 in Google SERPs, a top Google Place ranking, a Youtube video in the top 10 and a Google Ad place somewhere in the mix of first page ads. The root domain is nowhere to be found. Is there something I need to correct either on the site, in Google Webmaster or in WP Settings that I am not aware that is pushing all the Google Rank and Trust to the blog instead of the other way around? I considered changing the WP Site URL to the root domain thinking it will pass more SEO mojo to the root. But I don't think this is the way to go. I am kind of at a loss, any help is appreciated.
Technical SEO | | SEO-Novice0 -
Help fixing the traffic drop that started on 4 September 2012.
I'm happy to be a part of this wonderful community here and request help analysing my situation and would appreciate suggestions to fix the issues I'm facing. First, The Website Setup - We've a WordPress powered technology blog on main domain - http://www.crazyengineers.com & community forum on /community/ In the last 60 days, I've made following changes to the site that might have gone against us. 1. I added a sidebar to all the pages of our community forums to offer more useful information to the users, like recent threads, our latest exclusive interviews etc. 2. I added a descriptive welcome notice on all the pages of community at the top. 3. I added two ad-spots above the fold, didn't hurt user experience (IMHO). 4. I removed a LARGE number of unwanted tags from our WordPress blog that offered no value to visitors; resulting into Google Webmaster Tools reporting a large number of 404 - Page Not Found errors. Point To Note: Since September 4, I've been noticing significant drop in our traffic to the 'community' forums. The traffic is down almost 40-50%. Corrective Measures I've Taken - 1. Made sure that all the removed tags show proper 404 HTTP status. I added a search box to the 404 pages so that users have opportunity to find what they're looking for. 2. Removed the two ad-spots and placed only one 728x90 leaderboard above the fold. 3. We never engaged in any black-hat SEO techniques, link-building or content-copying. I double checked whether there are any suspicious activities reported in GWT but haven't spotted any. I'd really appreciate analysis of what might have really gone wrong and the direction in which I should proceed to recover our traffic.
Technical SEO | | TheBigK0 -
Do I need an XML sitemap?
I have an established website that ranks well in Google. However, I have just noticed that no xml sitemap has been registered in Google webmaster tools, so the likelihood is that it hasn't been registered with the other search engines. However, there is an html sitemap listed on the website. Seeing as the website is already ranking well, do I still need to generate and submit an XML sitemap? Could there be any detriment to current rankings in doing so?
Technical SEO | | pugh0