Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I setup a virtual host and put in htaccess some rewrite rules... But they dont work.. Only the rules in virtual host config work.. What am i doing wrong?

.htaccess

setEnv TZ Europe/Athens
Options +FollowSymLinks

ErrorDocument 404 /404.php

php_value max_execution_time 600
php_value max_input_time 600
php_value upload_max_filesize 10M
php_value post_max_size 16M
php_value memory_limit 200M
php_value session.gc_maxlifetime 21600
php_flag magic_quotes_gpc Off


    RewriteEngine On
    RewriteBase /
    RewriteRule ^(.+)/home/?$ /index.php?__i18n_language=$1 [L]
    RewriteRule ^(.+)/press/([0-9]+)?$ /press.php?__i18n_language=$1&id=$2 [L]
    RewriteRule ^(.+)/profile/(.+)?$ /static.php?__i18n_language=$1&tag=$2 [L]
    RewriteRule ^(.+)/links/?$ /static.php?__i18n_language=$1&tag=links [L]
    RewriteRule ^(.+)/corporate/?$ /static.php?__i18n_language=$1&tag=corporate [L]
    RewriteRule ^(.+)/products/?$ /static.php?__i18n_language=$1&tag=products [L]
    RewriteRule ^(.+)/products/(.+)?$ /static.php?__i18n_language=$1&tag=$2 [L]
    RewriteRule ^(.+)/press/?$ /press.php?__i18n_language=$1 [L]
    RewriteRule ^(.+)/sitemap/?$ /sitemap.php?__i18n_language=$1 [L]
    RewriteRule ^(.+)/financial/?$ /financial.php?__i18n_language=$1 [L]
    RewriteRule ^(.+)/contact/?$ /static.php?__i18n_language=$1&tag=contact [L]
    RewriteRule ^(.+)/newsletter/?$ /newsletter.php?__i18n_language=$1 [L]

Virtual Host file

<VirtualHost *:80>
    ServerAdmin webmaster@localhost
    ServerName dev.skiandboard.gr

    DocumentRoot "C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\ski\content"
    <Directory />
Options FollowSymLinks
        AllowOverride All
</Directory>






    ErrorLog "C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\ski\error.log"

    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel warn

RewriteEngine On



RewriteRule ^/(.+)/cat/(.+)/([0-9]+)/?$ /category.php?__i18n_language=$1&category_tag=$2&page=$3 [L]
RewriteRule ^/(.+)/cat/(.+)?$ /category.php?__i18n_language=$1&category_tag=$2&page=1 [L]
RewriteRule ^(.+)/prd/?$ /product.php?__i18n_language=$1&product_tag=$2 [L]
RewriteRule ^(.+)/static/(.+)/?$ /static.php?__i18n_language=$1&page_tag=$2 [L]



</VirtualHost>
share|improve this question

2 Answers 2

Have a look in your "error.log" and "access.log" files. What lines appear when you go to a page?

share|improve this answer
up vote 0 down vote accepted

Problem solved... It seems that rewrite rules in htaccess dont want / at start... weird..

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.