Re: [users@httpd] mod_rewrite, .htaccess problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/20/05, Marc Collin <collinm@xxxxxxxxxxxxxxxx> wrote:
> in httpd.conf
>
> <Directory />
>   Options None
>   AllowOverride All
>   Order deny,allow
>   Deny from all
>  </Directory>
>
> # use .htaccess files for overriding,

Why?  Why aren't you just putting the directives directly in
httpd.conf (perhaps in an appropriate <Directory> section)?  This
makes for less complications.

>  AccessFileName .htaccess
>  # and never show them
>  <Files ~ "^\.ht">
>   Order allow,deny
>   Deny from all
>  </Files>
>
> my .htaccess file
>
> Options +FollowSymlinks
>  RewriteEngine on
>  ErrorDocument 404 /index
>
> RewriteRule ^news([0-9]+)$ newssection.php?sec_nosection=$1 [L]
>  RewriteRule ^index$ index.php [L]
>
> if i go to:
>  http://localhost/newssection.php?sec_nosection=1
>  that work fine...
>
> but if i try
>
> ttp://localhost/news1
>
> i get:
>
> Object not found!

Are there any other AllowOverride directives in httpd.conf or
Include'd files?  Are you sure the .htaccess file is being read?  Have
you tried putting in an obvious syntax error and making sure you get a
500 error from the server when you request the directory?  Have you
tried the RewriteLog?

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux