Jump to content


Mod_rewrite


  • Please log in to reply
4 replies to this topic

#1 Guest_footballkid4_*

Guest_footballkid4_*
  • Guests

Posted 05 November 2005 - 07:03 AM

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

#2 Cook

Cook
  • Members
  • PipPipPip
  • Advanced Member
  • 64 posts
  • LocationSingapore

Posted 05 November 2005 - 07:54 AM

Try backslashing the dot of your .php extension.
Cook

#3 Guest_footballkid4_*

Guest_footballkid4_*
  • Guests

Posted 05 November 2005 - 02:06 PM

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

#4 shoz

shoz
  • Staff Alumni
  • Advanced Member
  • 600 posts

Posted 10 November 2005 - 11:24 PM

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


#5 Guest_footballkid4_*

Guest_footballkid4_*
  • Guests

Posted 10 November 2005 - 11:46 PM

I have it fixed now.
Thanks




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users