0

Im trying to find how to take a page request such as http://www.domain.com/sam/?dog=woof&cat=meow and send it to http://www.domain.com/animals.php?dog=woof&cat=meow

Ive tried a few things ive found on here, or i adapted them i should say, but i keep getting either nothing, or infinite loops.

Any ideas?

UPDATE

this is the htaccess file as it stands now

when i make my above request, i get sent to domain.com/sam/index.php (which is not there)

RewriteEngine on 
RewriteBase /
RewriteRule ^sam/$ animals.php [QSA]
RewriteCond %{REQUEST_URI} !(\.gif)|(\.jpg)|(\.png)|(\.css)|(\.js)|(\.php)|(\.swf)|(\.xpi)|(\.ico)|(\.src)$ 
RewriteCond %{REQUEST_URI} ^(.*)$
#RewriteCond %{REQUEST_FILENAME} ! -f

RewriteRule (.*)$ get.php?code=$1 [L]

1 Answer 1

1
RewriteEngine on
RewriteBase /
RewriteRule ^sam/$ animals.php [QSA]

If in an .htaccess on the parent of "sam", the RewriteBase can be omitted.

Sign up to request clarification or add additional context in comments.

1 Comment

@Patrick Post the rewrite log with rewriteloglevel 9. See httpd.apache.org/docs/2.2/mod/mod_rewrite.html#rewritelog

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.