Jump to content

Mod_rewrite


Guest footballkid4

Recommended Posts

Guest footballkid4

I would have posted it on ApacheFreaks but this is more active.

Anyways, I have my .htaccess like this:

RewriteEngine on 
RewriteRule ^/files/(.*).php$ /index.php?fuseaction=$1

Is there somethign in there that would prevent it from working? This is my first time EVER installing or working with Apache, I have 2.0.55 installed. I heard ou had to uncomment the loadmodule line for Mod_rewrite so I did that, but there was also somethigna bout AddModule? Not sure about that...

Link to comment
Share on other sites

Try Removing the '/' at the start

RewriteRule ^files/

When using the RewriteRule in a .htaccess the directory you're in is stripped(terminology may be off).

 

ie if this was a .htaccess file inside the "files" directory for a request like http://host/files/file.html you would use ^file.html$ and not ^files/file.html$

 

Also check your logs and turn the Rewrite Log Level higher

RewriteLogLevel 7
RewriteLog path/to/rewrite_log_file

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.