Forum Moderators: phranque

Message Too Old, No Replies

Remove folder from URL

apache remove folder .htaccess

         

sananthv

7:32 am on Sep 28, 2010 (gmt 0)

10+ Year Member



I have a joomla CMS. I have multiple urls with an unwanted folder name that is directing to the wrong page.

1. domainname.com/recently-updated/category1/page1.html
2. domainname.com/recently-updated/category2/page2.html
3. domainname.com/recently-updated/category3/page3.html

How do I write a command in .htaccess to remove the recently-updated folder so that the links look like these

1. domainname.com/category1/page1.html
2. domainname.com/category2/page2.html
3. domainname.com/category3/page3.html

Thanks in advance.

jdMorgan

2:35 pm on Sep 28, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You have to publish correct links on your pages, and mod_rewrite cannot help you do that. That is a problem with your Joomla configuration or with the URLs you declared for the new content.

Once those correct links are published, then mod_rewrite can accept a request for a URL like domainname.com/category1/page1.html and tell the server to read the file from /recently-updated/category1/page1.html

Jim