htaccess and symlinks

Asked by:
mugenmonkey / 15 Points
Time:
2012-11-12 12:48 am EST
Category:
Htaccess
Hits:
1,707
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.

To ask this user for more information, please first login.

To submit an answer, please login.

Best answer chosen by User

0

ScottM
Staff
16,266 Points
2012-11-12 6:51 pm EST
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

To submit a comment on this answer, please first login.

Want to share this Question?

Related Articles

It looks like there are no related articles.
Would you like to ask a question about this page? If so, click the button below!
Need More Help?

Help 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.
}