Michael
Michael

Reputation: 388

Mod-rewrite not working on Network Solutions server

I have a website that requires mod-rewrite to function well, but it seems to not be functional on the Network Solutions shared server we're running on. Network Solutions promises it's installed but won't provide any further support without additional payment.

I placed a simple test at the following folder which contains two files. The first, ".htaccess" contains the following text:

RewriteEngine On
RewriteRule ^link([^/]*).html$ rewrite.php?link=$1 [L]

The second is the PHP script which tests it, available here: http://www.oceanhousefloridakeys.com/testmr/rewrite.php

All I see is that mod-rewrite is installed (no error messages showing) but the rewriteRule is not working. Can anybody see why this script isn't working... is there anything I can do to get it running, or is Network Solutions not telling the whole truth?

Upvotes: 1

Views: 1770

Answers (1)

vstm
vstm

Reputation: 12537

It looks like your script resides inside a sub-directory. In that case it's the best solution to set the RewriteBase to the correct path (before any RewriteRule):

RewriteEngine On
RewriteBase /testmr/
RewriteRule ^link([^/]*).html$ rewrite.php?link=$1 [L]

Upvotes: 5

Related Questions