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
https://forums.phpfreaks.com/topic/2802-mod_rewrite/
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
https://forums.phpfreaks.com/topic/2802-mod_rewrite/#findComment-9533
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.