Jump to content

Archived

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

Guest footballkid4

Mod_rewrite

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

Share this post


Link to post
Share on other sites

Try backslashing the dot of your .php extension.

Share this post


Link to post
Share on other sites
Guest footballkid4

Still nothing. It seems like it's something wrong with my Apache config :(

Share this post


Link to post
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

 

Share this post


Link to post
Share on other sites
Guest footballkid4

I have it fixed now.

Thanks

Share this post


Link to post
Share on other sites

×

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.