• Hi. We discovered an issue where shortened URLs would return a 404 if the trailing slash was not included in the URL. I resolved this problem by making a slight modification to the rewrite rules created in the .htaccess file. I am just sharing so that these can be included in future versions, or handled in some other way to ensure the short URLs work with or without a trailing slash included.

    RewriteRule ^u/([0-9]+)/?$ u.php?$1|$2

    The modification I made was to add the ‘?‘ before the ‘$‘ character to match on 0 or 1 trailing slash (/). We do not use the Custom Varialbes ($2) feature, so I am not sure if the modification I made breaks that functionality. Thanks!

    http://wordpress.org/extend/plugins/shorten-url/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hum… not sure to understand.

    Could you give me an example of an url that do not have any trailing slash and cause a 404 issue ?

    I will try to correct it if there is a bug

    Sed Lex

    (@sedlex)

    If you have additional information to give please tell me

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Rewite Rule Problem Causing 404’ is closed to new replies.