Old 11-20-2009, 11:37 AM   #1
soori
Registered User
Mod_rewrite

We have a oScommerce site installed in the subfolder /catalog.

We want to hide the folder name 'catalog' from the URL. However, there is a dynamic Web site in the root folder.

# Begin default subdomain redirect #
RewriteEngine on
RewriteCond %{HTTP_HOST} ^domain.com
RewriteRule ^(.*)$ http://www.domain.com/$1 [r=permanent,L]

# End default subdomain redirect #
# Begin cache control #
ExpiresActive on
<FilesMatch "\.(css|ico|gff|jpg|doc|ppc|gz|gzip|wav|mp3|bmp|pn g|pdf|mov|zip|js|jpeg|avi|gif|exe|gcf)$">
FileETag All
ExpiresDefault "now plus 4 hours"
Header set Cache-Control "max-age=14400, public"
</FilesMatch>


# End cache control #
DirectoryIndex home.html home.php index.html index.php


AddType application/x-httpd-php .htm .html
Options +FollowSymLinks


# AddHandler application/x-httpd-php4 .php
# to make the default page home.html
#AddHandler application/x-httpd-php html
RemoveHandler .html .htm
RewriteEngine On
RewriteBase /catalog/
RewriteRule ^(.*)-p-(.*).html$ product_info.php?products_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-c-(.*).html$ index.php?cPath=$2&%{QUERY_STRING}
RewriteRule ^(.*)-m-([0-9]+).html$ index.php?manufacturers_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-pi-([0-9]+).html$ popup_image.php?pID=$2&%{QUERY_STRING}
RewriteRule ^(.*)-t-([0-9]+).html$ articles.php?tPath=$2&%{QUERY_STRING}
RewriteRule ^(.*)-a-([0-9]+).html$ article_info.php?articles_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-au-(.*).html$ articles.php?authors_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-pr-([0-9]+).html$ product_reviews.php?products_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-pri-([0-9]+).html$ product_reviews_info.php?products_id=$2&%{QUERY_ST RING}
RewriteRule ^(.*)-i-([0-9]+).html$ information.php?info_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-links-(.*).html$ links.php?lPath=$2&%{QUERY_STRING}
RewriteRule ^(.*)-pm-([0-9]+).html$ info_pages.php?pages_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-by-(.*).html$ all-products.php?fl=$2&%{QUERY_STRING}


Please guide me how to mask/ hide the catalog folder by modifying the .htaccess code?


Thanks in advance.

Last edited by soori; 11-20-2009 at 01:32 PM..
soori is offline   Reply With Quote

Sponsored Links (Guests Only) - Register | Need Help?
 

Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 04:28 PM.

SUPPORTERS:

kirupa.com's fast and reliable hosting provided by Media Temple. flash components
Creative web apps. Make your own free flash banners and photo slideshows.
Check out the great, high-quality flash extensions. Buy or sell stock flash, video, audio and fonts for as little as 50 cents at FlashDen.

Flash Transition Effects

Flash Effect Tutorials

Digicrafts Components
Flash effects. Art without coding. Upload, publish, deliver. Secure hosting for your professional or academic video, presentations & more. Screencast.com
Streamsolutions Content Delivery Networks Flipping Book - page flip flash component.
Flash-Gallery.com - Get your flash photo gallery (flash component or swf gallery Learn how to advertise on kirupa.com
 

cdn
content delivery network (cdn)

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd. Copyright 2010 - kirupa.com Copyright 2010 - kirupa.com