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
-
Help Setting Up 301 Redirects from Coldfusion Site to Wordpress Site.
I have created a new website and need to redirect all of the previous pages to the new one. The old website was built in coldfusion and the new site is built in wordpress. One of the pages I'm trying to redirect is www.norriseal.com/products.cfm to http://norrisealwellmark.com/products/. This is what I have in my .htaccess file <ifmodule mod_rewrite.c="">Options +FollowSymlinks
Technical SEO | | MarketHubb
RewriteEngine On
RewriteBase /
Redirect 301 /products.cfm http://norrisealwellmark.com/products/</ifmodule> The result of this redirect is http://norrisealwellmark.com/products.cfm How do I prevent the .cfm from appending to the destination URL?1 -
Hello I have a Magento Store View issue!
Hi guys hope you can help - we have recenetly added a couple of "store views" to our magento website, in order for us to break down orders from channels that feed through M2e pro. What is great is that it gives us a little break down on amazon, ebay and the store sales separate, depending on which we select. However - we have ran into a issue with duplicate content, mainly on pages such as the checkout? /checkout/?___store=default&___from_store=m2e_ebay /checkout/?___store=default&___from_store=m2e_amazon Issue being the above - I am hoping we can keep how we have broken down the store for a quick reporting instance by day. However how do / if I can - get round this?? Surely if I was to redirect on the checkout it would cause issues. Any advice greatly appreciated Kelly
Technical SEO | | KellyLloyd6660 -
Large Domain Authority Drop - Please Help
Hey there all, We are having the toughest time trying to figure out why our domain authority went from 12 to 3 with a search visibility score of literally zero. Back in Feb when the D.A.'s were all updated, we went down while all our competitors went up. We've been stuck at 3 for a few months and we can't understand why and aren't sure if we are dealing with a penalty of sorts. www.skycraftstudios.com is our site. We have a total of 60 some odd links in Search Console (some are garbage that we have disavowed, others are quality) but none of them are getting picked up in the newer MoZ index. We have added a few quality links lately, and even sped up our site quite a bit in conjunction with standard best practice optimizations, and even added an SSL cert, yet we stuck at a terrible D.A. of 3 and aren't even able to get into the top 10 pages of our main targeted term which seems incredibly odd to us. The site has been up for almost 2 years. Could this be simply a matter of not enough quality inbound links from the index? Any insight here would be appreciated.
Technical SEO | | SkycraftNate1 -
How to get only the most needed css for faster loading?
I have been using the Firefox duster app to clean up my css so only the page rendering css is loaded when my page is loaded. But it doesn't seem to be working now. Does anyone know of another tool that will do this for me?
Technical SEO | | RoxBrock0 -
I need an XML sitemap expert for 5 minutes!
Hi all! I'm hoping that someone with a lot of experience with XML sitemaps can help me out here... When submitting my sitemap in Google Webmaster Tools, these are the results:
Technical SEO | | IcanAgency
2,414,714 Submitted
34,721 Indexed And there's also tonnes of warnings. Would anyone be able to take a quick look at these sitemaps to perhaps advise me on what's going wrong there? These do not load without the www, not sure if this is an issue? http://www.eumom.ie/sitemap.xml
http://www.eumom.ie/sitemap.xml.gz Thanks everyone in advance!! Gavin0 -
Steady, but continous Google traffic drop. Help?
I am facing a steady, but deteriorating Google traffic drop and i am struggling to find the real reasons. The site is in the video entertainment niche. Here is some data regarding the site in general: Site redesign happened around June We are not doing a lot of off-site and link building in 2013, besides social activities and content distribution to partner sites (top links from OSE are gained long time ago) GWT crawls errors are clean (besides 404s) No manual actions from Google or penalty notifications Serious fluctuations in indexed content in June, but no real effect on traffic Removal of old content during August Top keywords are dropping (may be caused by category pages removal and flattening site structure) Robots file disallows only search-generated pages No sitemap errors or warnings 2K of duplicate meta-titles and descs Thank you and appreciate your help. wyOyoA9
Technical SEO | | dimicos1 -
Help with strange 404 Errors.
For the most part I have never had trouble tracking down 404's. Usually it's simply a broken link, but lately I have been getting these strange errors http://gridironexperts.com/http%3A/www.nfl.com/gamecenter?game_id=29528&season=2008&displayPage=tab_gamecenter/ What does; %C2%94 repersent? The error always points to NFL.com, but we don't link to them...like ever? Can I just 404: http://gridironexperts.com// to fix the problem, as all 404's start with this weird %C2%94 error. Is this error even on my site? Is in the backend...virus? thanks -Mike
Technical SEO | | MikePatch0 -
A script to automatically write 301 redirect rules to htaccess?
I was wondering if anyone could help provide some resources on how to automatically write 301 redirect rules to htaccess. Allow me to explain... I'm building a new website and the primary users are businesses. They have their own profile pages on the site. The URL is based off of their Company Name. In the event that they decided to change their name... reasons being, perhaps they mispelled it the first time, or they're removing LLC or adding Inc, I want to also change the URL and redirect the old URL to the new URL. Since the URL is based off of their Company Name, making a change to the company name would make a change to the URL. I know it doesn't have to work this way, but for our purpose this works best. In case the old URL had any links to it, I wanted to see if there was an way to automatically update an htaccess file with a 301 redirect from the old URL to the new one. Could anyone point me in the right direction of how to do this? Perhaps a sample script. I've done a lot of searches on Google and can't seem to find anything. e.g. Original:
Technical SEO | | bimmer540
Name: XYZ Widgets
URL: website.com/xyz-widgets New - business changes their company name in their profile:
Name: XYZ Widgets, Inc.
URL: website.com/xyz-widgets-inc Upon the user saving the changes in their profile, I'd like to write a 301 redirect to an htaccess file:
Redirect 301 /xyz-widgets http://www.website.com/xyz-widgets-inc I know how to manually write redirects and I've got a pretty smart web developer. We've just never triggered a script to automatically write to an htaccess file before. Is this possible? Any resources are appreciated. Any security risks? Thanks!0