I was thinking of making my MediaWiki URL work like...

 
Post new topic   Reply to topic    Aprelium Forum Index -> URL Rewriting
View previous topic :: View next topic  
Author Message
easytec
-


Joined: 17 Aug 2007
Posts: 55

PostPosted: Tue Sep 18, 2007 3:26 pm    Post subject: I was thinking of making my MediaWiki URL work like... Reply with quote

Wikipedia's, how can I do this AND make it work normal for the other applications.
I DO NOT KNOW THE FIRST THING ABOUT URL REWRITING, I JUST DISCOVERED IT TODAY.
I want this for my 'MediaWiki' URL:
(I have no domain name by the way).
http://127.0.0.1/wiki/index.php?title=Main_Page
... to look like this:
http://127.0.0.1/wiki/Main_Page
Please help!
Back to top View user's profile Send private message
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Wed Sep 19, 2007 12:56 am    Post subject: Re: I was thinking of making my MediaWiki URL work like... Reply with quote

easytec,

Create a URL rewriting rule as follows:

Virtual path regular expression: ^/wiki/(.*)$
If rule matches: Perform an internal redirection
Redirect to: /wiki/$1
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
easytec
-


Joined: 17 Aug 2007
Posts: 55

PostPosted: Wed Sep 19, 2007 6:44 pm    Post subject: Reply with quote

Didn't work, still error page, does MediaWiki need this setup?
Back to top View user's profile Send private message
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Thu Sep 20, 2007 12:48 pm    Post subject: Re: I was thinking of making my MediaWiki URL work like... Reply with quote

easytec,

Sorry there were missing conditions. The whole URL rewriting rule should be:

Virtual path regular expression: ^/wiki/(.*)$
Condition 1: REQUEST_FILENAME Is Not File
Condition 2: REQUEST_FILENAME Is Not Directory
If rule matches: Perform an internal redirection
Redirect to: /wiki/index.php?title=$1
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
easytec
-


Joined: 17 Aug 2007
Posts: 55

PostPosted: Fri Sep 21, 2007 1:47 pm    Post subject: Reply with quote

That didn't work so I tried:
^/wiki/(.*)?title=$
... to redirect fromL
/wiki/$
But the URL looks like: /wiki/?Main_Page but won't work as /wiki/Main_Page, which I want.
Back to top View user's profile Send private message
Moxxnixx
-


Joined: 21 Jun 2003
Posts: 1226
Location: Florida

PostPosted: Fri Sep 21, 2007 7:23 pm    Post subject: Reply with quote

easytec,
Use Aprelium's settings in his last post, except change the redirect to: to...

/wiki/index.php?title=$1
Back to top View user's profile Send private message Visit poster's website
admin
Site Admin


Joined: 03 Mar 2002
Posts: 1295

PostPosted: Fri Sep 21, 2007 11:48 pm    Post subject: Reply with quote

Moxxnixx wrote:
/wiki/index.php?title=$1


Thanks for fixing that. It was a second mistake. Sorry easytec. Hopefully the fixed rule will work fine now.
_________________
Follow @abyssws on Twitter
Subscribe to our newsletter
_________________
Forum Administrator
Aprelium - https://aprelium.com
Back to top View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> URL Rewriting All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group