View Full Version : .htaccess file prob

05-17-2010, 12:05 PM


I have a problem with SEF url in PHP
I want url like

actual url

and my .htaccess file is

<files ~ "^\.ht">
Order allow,deny
Deny from all
<IfModule mod_rewrite.c>
RewriteBase /
<Files site>
ForceType application/x-httpd-php
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^localhost
RewriteCond $1 !^GUI/
RewriteRule ^(.*)$ /office/GUI/$1 [L]
RewriteRule index/(.*)/(.*)/$ /index.php?$1=$2 [P]

but i am getting redirected by typing this url in


Can you please let me know where i have done mistake.

Thanks in advance

05-17-2010, 04:12 PM
First, this isn't PHP code at all. Second, its definitely not a snippet. Moving from PHP Snippets to Apache configuration.
What you have and describe is correct (though you don't appear to need the files directive to control the htaccess file. That doesn't really make sense). You type in yoursite.com/index/user/Username, and you are redirected to index.php?user=Username correct? This is the normal behaviour of mod_rewrite. Sounds to me like you are also expecting it the other way around, but your links themselves will not rewrite in this way.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum