| Welcome to WebmasterWorld Guest from 18.104.22.168 |
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
|Pubcon Platinum Sponsor 2014|
|how to remove folder name from url?|
Client removed section name from cms now google links 404
| 11:21 pm on Feb 17, 2011 (gmt 0)|
Joomla site client removed the virtual folder "general" from the urls.
I can't even figure how she did that but it wasn't through htaccess.
Google linked her urls with /general/ in the url. They're 404'ing.
How can I re-write her site's links so that if someone asks for
it goes to the correct place which is
I've looked and looked but can't find this exact answer.
[edited by: jdMorgan at 4:53 am (utc) on Feb 18, 2011]
[edit reason] Switched to example,.com to avoid auto-linking [/edit]
| 11:30 pm on Feb 17, 2011 (gmt 0)|
those urls didn't print --
site / category / general / page
site / category / page
| 11:39 pm on Feb 17, 2011 (gmt 0)|
the reason those url's don't print is that you should use
example.com - that's what it is for.
... what have you tried so far?
| 12:53 pm on Mar 1, 2011 (gmt 0)|
thank you so much, my apologies for the delay.
RewriteRule ^/?general([a-z/.]*)$ /$1 [R=301,L]
RewriteCond $1 !^general/
RewriteCond ^/(.*)$ /general/$1 [L]
RewriteRule ^general/(.*)$ /$1 [L]
I'm pretty much a newb at htaccess.
2 is a server error
1 and 3 just don't work
| 1:53 pm on Mar 1, 2011 (gmt 0)|
The redirects must be listed before the Joomla internal rewrite code.
The redirects must use RewriteRule syntax with the [R=301,L] flags.
RewriteRule ^(([^/]+/)*)general/([^.]+)\.html http://www.example.com/$1/$3.html [R=301,L]
Immediately after this code, place your canonical non-www to www redirects, again using RewriteRule syntax.
See also: [webmasterworld.com...]
| 4:14 am on Mar 3, 2011 (gmt 0)|
Fantastic! Thank you so much!
All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved