Mobile app version of vmapp.org
Login or Join
Dunderdale272

: How do I use htaccess to make a short URL to a MediaWiki page? I'd like to rewrite /liam to /index.php/Liam_Edwards-Playne. I've currently written this below in the appropriate .htaccess file

@Dunderdale272

Posted in: #Apache #Htaccess #Mediawiki #Url #UrlRewriting

I'd like to rewrite /liam to /index.php/Liam_Edwards-Playne. I've currently written this below in the appropriate .htaccess file but it is still returning a 404:

RewriteEngine On
RewriteRule ^/liam$ %{DOCUMENT_ROOT}/index.php/Liam_Edwards-Playne [NC,L]

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Dunderdale272

1 Comments

Sorted by latest first Latest Oldest Best

 

@Gretchen104

You shouldn't need the DOCUMENT_ROOT variable. Simply doing:


RewriteRule ^liam$ /index.php/Liam_Edwards-Playne [NC,L]


is sufficient for mod_rewrite

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme