zackcez Posted June 18, 2008 Share Posted June 18, 2008 I have a script that is currently accessable by using this format: http://mysite.com/tests/demo/sig.php?user=USER That will then display a png image. But, I want it like this: http://mysite.com/tests/demo/sig.php/USER.png This is my current .htaccess: RewriteEngine on RewriteRule ^sig/([^/\.]+)/?$ sig.php?user=$1 [L] Quote Link to comment https://forums.phpfreaks.com/topic/110686-mod-rewrite/ Share on other sites More sharing options...
Jabop Posted June 18, 2008 Share Posted June 18, 2008 This isn't the forum for it, but why do you want to mod rewrite and change the url, but not remove the php info from the url? Typically, rewrite rules are used for cleanliness and nicely displayed urls Quote Link to comment https://forums.phpfreaks.com/topic/110686-mod-rewrite/#findComment-567852 Share on other sites More sharing options...
zackcez Posted June 18, 2008 Author Share Posted June 18, 2008 So it's usable on forums.... Quote Link to comment https://forums.phpfreaks.com/topic/110686-mod-rewrite/#findComment-567855 Share on other sites More sharing options...
Jabop Posted June 18, 2008 Share Posted June 18, 2008 RewriteRule ^sig/([A-Za-z0-9-_\s]+)?$ /tests/demo/sig.php?user=$1 [NC,QSA] Quote Link to comment https://forums.phpfreaks.com/topic/110686-mod-rewrite/#findComment-567856 Share on other sites More sharing options...
zackcez Posted June 18, 2008 Author Share Posted June 18, 2008 Error 500 - Internal server error An internal server error has occured! Please try again later. Quote Link to comment https://forums.phpfreaks.com/topic/110686-mod-rewrite/#findComment-567874 Share on other sites More sharing options...
Jabop Posted June 18, 2008 Share Posted June 18, 2008 Load the mod_rewrite module in your apache config Quote Link to comment https://forums.phpfreaks.com/topic/110686-mod-rewrite/#findComment-567886 Share on other sites More sharing options...
zackcez Posted June 18, 2008 Author Share Posted June 18, 2008 Sorry to be a...inconvenience, but can you point me to somewhere I can learn to do that :s? Quote Link to comment https://forums.phpfreaks.com/topic/110686-mod-rewrite/#findComment-567888 Share on other sites More sharing options...
Jabop Posted June 18, 2008 Share Posted June 18, 2008 I don't know where it'd be on a Windows system, but if you're running Linux, the default location for your config file is here: /etc/httpd/conf/httpd.conf There will be lots of commented out modules find LoadModule rewrite_module modules/mod_rewrite.so uncomment it, restart apache Quote Link to comment https://forums.phpfreaks.com/topic/110686-mod-rewrite/#findComment-567892 Share on other sites More sharing options...
zackcez Posted June 18, 2008 Author Share Posted June 18, 2008 I'm using 1and1 hosting Quote Link to comment https://forums.phpfreaks.com/topic/110686-mod-rewrite/#findComment-567897 Share on other sites More sharing options...
Jabop Posted June 18, 2008 Share Posted June 18, 2008 Do you have ssh access? Quote Link to comment https://forums.phpfreaks.com/topic/110686-mod-rewrite/#findComment-567900 Share on other sites More sharing options...
bluejay002 Posted June 18, 2008 Share Posted June 18, 2008 I'm using 1and1 hosting if you cant access it, most likely you can't, better ask the provider of the hosting site bout your concern. Quote Link to comment https://forums.phpfreaks.com/topic/110686-mod-rewrite/#findComment-567902 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.