Jump to content

[SOLVED] need help with correct syntax


Alt_F4

Recommended Posts

hi all,

 

i am new to mod_rewrites and need a bit of help getting the syntax right for what i am trying to do.

 

I have urls that look like so:

 

http://localhost/foo/bar/blah

http://localhost/foo/bar/bla

 

and would like to have them send something like this to the server so i can parse it and dynamically display the correct page:

 

http://localhost/foo/bar/index.php?page=blah

http://localhost/foo/bar/index.php?page=bla

 

i have this in my htaccess file:

 

RewriteEngine on
Options +FollowSymlinks
RewriteBase /

RewriteRule ^(.*)$ /foo/bar/index.php?page=$1

 

but i get a 500 error and have no idea where i am going wrong.

 

any help would be greatly appreciated.

 

Link to comment
https://forums.phpfreaks.com/topic/177780-solved-need-help-with-correct-syntax/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.