htaccess and symlinks

Asked by:
mugenmonkey
Time:
2012-11-11 8:48 pm
Category:
Htaccess
Hits:
259
I really am not sure what im doing wrong here but symlinks do not seem to be working for me. At least not now. And the error log isnt much help.

Anyways, I am trying to create a url shortening service to go along with my website since it uses shortened urls quite often. I am trying to make it like tinyurl/bitly in that
mmdks.com/33e2e redirects to
mmdks.com/url.php?url=33e2e
then that script makes the request to the database, pulls up the link and redirects.

the htaccess file is set up as


Options +FollowSymlinks
RewriteEngine On
RewriteCond %{REQUEST_URI}\/([0-9a-z]*)$ [NC,C]
RewriteRule (.*) url.php?url=%1 [L]


Any help or suggestions would be appreciated.

You must login before you can ask a follow up question.

You must login before you can submit an answer.

Best answer chosen by User

0

ScottM
2012-11-12 2:51 pm
Hello mugenmonkey,

While I cannot get the sample links to allow me to see the results, it does appear that the htaccess code you gave is slightly off.

The RewriteRule line will need $ in place of the %.

After changing that, I still do not see any display on the screen, even with the destination URL in play. You may also want to check the php script to see if it is working correctly.

Best Regards,
Scott M

You must login before you can post a comment about this answer.

Like this Question?

Support Center Search

Current Customers

Email: support@WebHostingHub.com Ticket: Submit a Support Ticket
Call: 877-595-4HUB (4482)
757-416-6627 (Intl.)
Chat: Click To Chat Now

Ask the Community

Get help with your questions from our community of like-minded hosting users and Web Hosting Hub Staff.

Not a Customer?

Get web hosting from a company that is here to help.