How to redirect my .com/blog to my server folder /blog ?
-
Hello SEO Moz !
Always hard to post something serious for the 04.01 but anyway let's try !
I'm releasing Joomla websites website.com, website.com/fr, website.com/es and so on.
Usually i have the following folders on my server
- [ROOT]/com
- [ROOT]/com/fr
- [ROOT]/com/es
However I would like to get the following now (for back up and security purpose).
- [ROOT]/com
- [ROOT]/es
- [ROOT]/fr
So now what can I do (I gues .htaccess) to open the folder [ROOT]/es when people clic on website.com/es ?
It sounds stupid but I really don't know.
I found this on internet but did not answer my needs.
.htaccess
RewriteEngine On
RewriteCond %{REQUEST_URI} !(^/fr/.) [NC]
RewriteRule ^(.)$ /sites/fr/$1 [L,R=301]Tks a lot !
Florian
-
Nop I just put all of them in the same folder but I would like to change it
-
Hi Flo - Were you able to resolve this issue?
-
Hello !
Tks you for your help ! I contacted them and now waiting for their answer.
Let see what we can do
Tks a lot
-
somewhere on your root folder you will have a .htaccess file
.htaccess is a small server file that you can put conditions in. some conditions will redirect to a "new" location (your new folders) when the .htaccess detects a url to an "old" location. this is commonly called "mod rewrite".
the software used to issue these commands varies based on your web site host. contact them and ask them what rewrite/redirection software is on your account (for example, one common one is ISAPI rewrite:
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
-
301 Redirect Expert
I have hired two website people from odesk and had bad experience in 301 redirects. One never got it done and the other cause my website to crash on a 500 error code, he load all the redirects in a script on .htaccess on my wordpress site on godaddy, there were 1400 redirect.Can somebody recommend a expert for my redirect problem.
Technical SEO | | tjacquet0 -
301 Redirect keep html files on server?
Hello just one quick question which came up in the discussion here: http://moz.com/community/q/take-a-good-amount-of-existing-landing-pages-offline-because-of-low-traffic-cannibalism-and-thin-content When I do 301 redirects where I put together content from 2 pages, should I keep the page/html which redirects on the server? Or should I delete? Or does it make no difference at all?
Technical SEO | | _Heiko_0 -
Can you redirect from a 410 server error? I see many 410s that should be directed to an existing page.
We have 150,000 410 server errors. Many of them should be redirected to an existing url. This is a result of a complete website redesign, including new navigation and new web platform. I believe IT may have inadvertently marked many 404s as 410s. Can I fix this or is a 410 error permanent? Thank you for your help.
Technical SEO | | sxsoule0 -
Use of Location Folders
I'd like to understand the pro's and con's of using a location subfolder as an SEO strategy (example: http://sqmedia.us/Dallas/content-marketing.html), where the /Dallas folder is holding all of my keyword rich page titles. The strategy is to get local-SEO benefits from the use of the folder titled /Dallas (a folder which is unnecessary in the over all structure of this site), but how much is this strategy taking away from the page-title keyword effectiveness?
Technical SEO | | sqmedia0 -
Cgi-bin folder
Is there cg-bin folder of any site related to SEO in anyways and why we always block Cgi-bin folder in robots.txt.
Technical SEO | | Alick3000 -
Holy Redirects
Currently working on a project for a medium sized site (http://sleeponcall.com/) but the SEOMoz crawl crawled over 14,000 pages because the report is showing more than 8,000 redirects. The client has no clue how this happened as their previous web programmers may not have been on the ball. What could be causing the problem and what is the best way to untangle this mess?
Technical SEO | | Nobody15330770827560 -
302 redirects help
Hello, I have a Magento ecommerce store and my latest seomoz crawl report shows over 10,000 302 redirects. An example is this below https://jsshirts.com.au/wishlist/index/add/product/160/ which is being redirected to http://jsshirts.com.au/enable-cookies Can anyone please help me with a solution to help with this problem. Many thanks
Technical SEO | | mullsey0 -
Mobile redirection
Hi, What would be the best practice for mobile detection: Best practice for redirections Best practice for detection and inclusion of a front-end element inviting to a mobile version of the site I found this on www.W3C.org but it's from 2008 and I was wondering if any of you tried different approaches concerning mobile detection. Thanks! GaB
Technical SEO | | Pherogab0