i have a site with category listing on home page when i click on a category or subcategory name that shows the items in that category.
url of site is :-
Code:
wholesalehub.com.php5-6.websitetestlink.com/
when click on a category the url looks like this
Code:
siteurl/listing/wholesale-apparel
here wholesale-apparel is category name and that is shown by .htaccess .The eal url is
Code:
siteurl/listing/results.php?category_id=5
the file results.php is resides in listing folder .i want to remove that word /listing from url but the file should be in the listing folder .i have a .htaccess file on root and one in /listing folder.
the code in root htaccess is
Code:
php_value auto_prepend_file /mnt/target02/351049/www.wholesalehub.com/web/content/conf/preconfig.inc.php
RewriteBase /mnt/target02/351049/www.wholesalehub.com/web/content
ErrorDocument 400 /customerrorpage.php
ErrorDocument 401 /customerrorpage.php
ErrorDocument 403 /customerrorpage.php
ErrorDocument 404 /customerrorpage.php
ErrorDocument 500 /customerrorpage.php
the code in /listing/.htaccess is
Code:
RewriteEngine On
RewriteBase /listing
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !^(.*/([a-zA-Z0-9_]+)|([a-zA-Z0-9_]+))\.(html|htm)$ [NC]
RewriteRule ^(.*/location|location)/([a-zA-Z0-9_]+)/?([a-zA-Z0-9_]+)?/?([a-zA-Z0-9_]+)?$ ./results.php?country=$2&state=$3®ion=$4
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} ^(.*([a-zA-Z0-9-]+)|([a-zA-Z0-9-]+))\.(html|htm)$ [NC]
RewriteRule ^(.*/([a-zA-Z0-9-]+)|([a-zA-Z0-9-]+))\.(html|htm)$ ./detail.php?listing=$1
RewriteRule ^(.*/([a-zA-Z0-9-]+)|([a-zA-Z0-9-]+))\.(html|htm)#([a-zA-Z0-9-]+)$ ./detail.php?listing=$1#2
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !^(.*/([a-zA-Z0-9-]+)|([a-zA-Z0-9-]+))\.(html|htm)$ [NC]
RewriteRule ^(([a-zA-Z0-9-]+)/?([a-zA-Z0-9-]+)?/?([a-zA-Z0-9-]+)?/?([a-zA-Z0-9-]+)?/?([a-zA-Z0-9-]+)?$) ./results.php?category1=$2&category2=$3&category3=$4&category4=$5&category5=$6
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !^(.*/([a-zA-Z0-9_]+)|([a-zA-Z0-9_]+))\.(html|htm)$ [NC]
RewriteRule ^(.*/reviews|reviews)/([a-zA-Z0-9_]+)$ ./reviewcomments.php?listing=$2
i have tried a lot but not found any solution.could anybody please help me.