简体   繁体   中英

Using Mod_Rewrite with extra slashes in URL

At /corner.php I have a script which adds rounded corners to an image. I'm using Mod_Rewrite to rewrite my site urls.

I want to be able to go to http://domain.com/corner/templates/Toys/images/no_image.gif and it will actually send me to /corner.php?source=templates/Toys/images/no_image.gif.

But because there are extra slashes in the url, it isn't working. Is there a way to do this.

I don't see any extra slashes which can disrupt mode rewrite.

This should work, also being in the same domain you don't have to specify it

RewriteEngine on
RewriteRule ^corner\/(.*)$       /corner.php?source=$1

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM