4
Contributors
6
Replies
7
Views
6 Years
Discussion Span
Last Post by abhi10kumar
0

What exactly isn't working? And anyway, what do you want to rewrite to what? Because according to your example I assumed brands -> brands.php, but you said the other way around.

0

Ensure that Rewrite Engine is on.

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^/([^/]+)/?$ /$1.php
0

Ensure that Rewrite Engine is on.

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^/([^/]+)/?$ /$1.php

Still no working..
Here it is complete .htaccess content

Options +FollowSymLinks
Options +Indexes
RewriteEngine on

RewriteCond %{HTTP_HOST} ^3gphone\.in$ [NC]
RewriteRule ^(.*)$ http://www.3gphone.in/$1 [R=301,L]

RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /.*index\.php\ HTTP/
RewriteRule ^(.*)index\.php$ /$1 [R=301,L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]*)$ /products.php?pname=$1

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^/([^/]+)/?$ /$1.php
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.