Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Mod Rewrite ? on a Shared Host

Status
Not open for further replies.

PaulinKC

Programmer
Apr 2, 2002
50
0
0
US
I am trying to rewrite some dynamic url's for a site that I manage because the url that gets generated looks something like this:

index.php?page=rhinovations&content=Slideshow&type=bathroom&view=slide&album=2

and below is my mod rewrite statements in the .htaccess file:
Code:
Options +FollowSymLinks
RewriteEngine on
RewriteRule .+\.(js|css|gif|jpe?g|bmp)$ - [NC,L]
RewriteRule ([^/]+)/([^/]+)/([^/]+)/([^/]+)(?:/(.+))? /index.php?page=$1&content=$2&type=$3&view=$4&album=$5 [L]

But for whatever reason it's not rewriting the url. I have checked the server logs and don't see any error message that would indicate a problem. The page still displays as if the rewrite is not happening.

Any ideas on what the issue might be? Any help would be greatly appreciated!!

Thank you,

Paul
 
+FileInfo ?

You mean something like Options +FileInfo needs to be added to the .htaccess file in order for the Rewrite rule to be applied?

When I did that I received a 500 Internal Server Error. I don't have direct access to the httpd.conf either.
 
Try a simple one to see if this works:

RewriteEngine on
RewriteRule test\.html [R]

..and see if that redirects to google.

If it does, then there is something wrong with your rewrite cond. Otherwise, as said before - its probably turned off in httpd.conf :)

Cheers

Andy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top