Forum Moderators: phranque

Message Too Old, No Replies

Newbie to RewriteRule

Problem with RewriteRule

         

craig_lock

5:44 pm on Jan 18, 2005 (gmt 0)

10+ Year Member



I want to send a specific URL syntax to go to a page like this below
URL Rewrite URL<ID>.htm to URL.php?ID=<ID>

this is the code that i use to do it, but comes up with an error

#### CODE START #######
RewriteEngine on
Options +FollowSymlinks

RewriteBase /test/
#RewriteCond %{REQUEST_FILENAME}!-f
RewriteRule ^press(.*).htm press.htm?PressID=$1 [R]
#### CODE END #######

The full path to the website is:
/home/bloww/public_html/test

If that is needed, any help given to point me in the right direction will be gratefully appreciated

jdMorgan

6:04 pm on Jan 18, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



craig_lock,

Welcome to WebmasterWorld!

Take a look at your server error log file after you get an error. It will identify the problem. You may be able to find it by fishing around using FTP. If not, ask your host where it is located.

Here's a cleanup of your code, but I doubt it will change anything:


Options +FollowSymLinks
RewriteEngine on
RewriteBase /test/
#RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^press([^.]+)\.htm$ /press.htm?PressID=$1 [L]

Again, find and check your server error log; It's essential for working with the server while preserving your sanity.

Jim

craig_lock

12:10 pm on Jan 19, 2005 (gmt 0)

10+ Year Member



Thank you managed to get it working from that using snippets of your code :D