Jump to content

Recommended Posts

is it possible to achieve something like this

instead of action.php?action=signup

you could do action:signup

since im not that good with RewriteRule i tried this (it didn't work)

RewriteRule /action:([a-z]) /action.php?action=$1

and if it is possible could you show me how?

 

Thanks,

Zack

 

You cannot use special characters such as colons as part of a url path.

 

You can have your url as  /action/signup or just /signup

RewriteBase /
RewriteRule ^action/([a-z]+)$ /test.php?action=$1 [NC,L] # eg: action/signup
RewriteRule ^([a-z]+)$ /test.php?action=$1 [NC,L]        # eg: /signup

the confusing part is that ive seen it done before

on a little video site called

vimeo

when you view a blog the url is like

http://www.vimeo.com/blog:122

122 being the ID

is that being done inside the script

where it takes apart the url and singles out the 122

and go through the database to find the ID

would that be PHP

or some other odd language

I have done a bit of googling and this is an issue to do with libapr when Apache is installed on Windows. Due to Windows not allowing characters such as colons within file names libapr is not allowing the requested url. However strangely enough if your url is say - mysite.com/foo/bar:test - then it'll work fine.

 

Whether a fix is going to be released or not in the next/future versions of Apache for Windows I don't know. This only affects Apache installations on Windows.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.