WordPress.org

Ready to get started?Download WordPress

Forums

Custom htaccess rules (3 posts)

  1. pikciu
    Member
    Posted 1 year ago #

    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.

  2. Jesús Franco
    Member
    Posted 1 year ago #

    Why are you putting again /fca/ in the WP rules?

  3. pikciu
    Member
    Posted 1 year ago #

    Do you mean RewriteBase /fca/ ?

Topic Closed

This topic has been closed to new replies.

About this Topic