Options +FollowSymLinks
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) /files.php?q=$1
RewriteCond %{HTTP_HOST} ^mysite.com
RewriteRule (.*) http://m.mysite.com/$1 [R=301,L]
AddHandler application/x-httpd-php5 .html .htm .txt .php
my .htaccess uses the main "files.php" for all requests. in my files.php i have some code in it that includes hrefs which looks like this:
/people/john
--> when a person clicks on this, it should go to: people.php?q=john
however, my .htaccess is not redirecting when person clicks on this /people/john
.
btw, the url should always say /people/john
NOT people.php?q=john
even though that is what is happening behind the scenes.
Just wanted to say, i have
/city/newyork --> city.php?q=newyork
/country/australia --> country.php?q=australia
I have been struggling and searching here to find exactly, but still no luck. i appreciate all the responses.