Hey all,
I have the following rewrite rule in my .htaccess file of which works fine in order to produce my friendly urls:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !^robots\.txt$
RewriteRule ^(vets)/([a-zA-Z0-9_-]+) /index.php?p=$1/$2 [L]
The problem is I have all the files located in a folder called /foo/contact.php
The files are called from my index.php at the web root.
The only issue here is that the web address is displayed as such:
http://www.mywebsite/foo/contact
My question is how can I get it to be displayed like the following:
http://www.mywebsite/contact
here is a snippet of my index.php
<?php
$page = isset($_GET['p']) ? $_GET['p'] : 'foo/home';
switch($page) {