Re: [users@httpd] not able to do url rewriting

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

 



On 6/26/06, Marc Collin <collinm@xxxxxxxxxxxxxxxx> wrote:
hi

i use suse linux 10.1 64 bits (AMD)

i copied my web site in local to convert it to php5

mysql apache work

the problem i got in local is the url rewriting don't work

my i modified in the httpd.conf
<Directory />
    Options None
    AllowOverride All
    Order deny,allow
    Deny from all
</Directory>

# use .htaccess files for overriding,
AccessFileName .htaccess
# and never show them
<Files ~ "^\.ht">
#<Files .htaccess>
    Order allow,deny
    Deny from all
</Files>


in the /etc/sysconfig/apache2 i add
rewrite



my .htaccess

Options +FollowSymlinks
RewriteEngine on
RewriteRule ^news([0-9]+)$ newssection.php?sec_nosection=$1 [L]

To start with, unless absolutely necessary, I'd avoid putting the
RewriteRule in .htaccess.  You should just be able to put the
following in the main section of httpd.conf:
RewriteEngine On
RewriteRule ^/laboiteaprog/news([0-9]+)$
/laboiteaprog/newssection.php?sec_nosection=$1 [L]

If you really need to use .htaccess, then check if you have any other
AllowOverride directives anyplace else in httpd.conf that may be
overriding the one applying to <Directory />.

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