Forum Moderators: phranque
[domain.com...]
to ->
[domain.com...]
and if possible still show the first url format in the address bar in the browser.
Can this be done, and how?
Thank You.
Create a index (NO EXTENSION) file in the (http://domain.com/dir1/) and put these 2 lines in the beginning.
--------------------------------------
$var_array = explode("/",$PATH_INFO);
print $var_array[0];
print "<br>";
print $var_array[1];
--------------------------------------
Entering the URL [domain.com...] will return:
xxxx
yyyy
With this solution, you just have to make sure that 'site' goes first and then follows by 'id' in the URL format. If not, you can mix up your variables.
Next step...
Put this in the .htaccess in the [domain.com...]
---------------------------------------
ForceType application/x-httpd-php
---------------------------------------
This .htaccess forces the server to parse PHP even though thre's no extension for files located under [domain.com...]
At the end, you must insert 'index' between 'http://domain.com/dir1/' and '/xxxx/yyyy/' for this to work.
[domain.com...]
Hope this helps!
Welcome to WebmasterWorld [webmasterworld.com]!
Something like this added to your .htaccess file, which rewrites
[domain.com...] -> [domain.com...]
should work. (See the reference below, and the links cited in that reference, if you need to modify it)
Options +FollowSymLinks
RewriteEngine on
RewriteRule ^/dir1/([^/])/([^/])/(.*)$ /dir1/$3?site=$1&id=$2 [L]
HTH,
Jim