WordPress.org

Support

Support » How-To and Troubleshooting » Custom htaccess rules

Custom htaccess rules

  • Hi,

    I have created a custom module, for editing sport matches. I tried to add my custom url rewrite, but it’s not working. My website is now at localhost, with address http://localhost/fca/

    I have created a page with address http://localhost/fca/programe-de-meci/ where it is a list of seasons (2011-2012, 2012-2013 etc.) For each season, i have the link http://localhost/fca/sezon-programe/?id_sezon=51&nume_sezon=2011-2012 but i want to look like http://localhost/fca/sezon-programe/51/2011-2012

    This is what i have in my .htaccess file:

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /fca/
    RewriteRule sezon-programe/([0-9]+)/([A-Za-z0-9]+)/ sezon-programe/?id_sezon=$1&nume_sezon=$2 [L]
    </IfModule>
    
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /fca/
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /fca/index.php [L]
    </IfModule>
    
    # END WordPress

    What am I doing wrong? Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Custom htaccess rules’ is closed to new replies.
Skip to toolbar