can anybody please tell me
how rewrite .php files to .html files in a folder.
or how to rewrite urls like http://examle.com/files/ (actual path )
using web.config file.
rajendher 0 Light Poster
Recommended Answers
Jump to Post— cilla 15You can try this:
<?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <rewrite> <rules> <rule name="Serve PHP files sans ext" stopProcessing="true"> <match url="^(.*)$" /> <conditions logicalGrouping="MatchAll"> <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" /> <add input="{REQUEST_FILENAME}.php" matchType="IsFile" ignoreCase="false" /> </conditions> <action type="Rewrite" url="{R:1}.php" /> </rule> </rules> </rewrite> </system.webServer> </configuration>
Jump to Post— Member #120589for this use apache rewrite. there are many tutorials online
Jump to Post— cilla 15^ what he said
All 11 Replies
cilla 15 Light Poster
Member #120589
cilla 15 Light Poster
rajendher 0 Light Poster
rajendher 0 Light Poster
rajendher 0 Light Poster
gabrielcastillo 40 Web Developer
rajendher 0 Light Poster
Member #120589
rajendher 0 Light Poster
pritaeas 2,276 Most Valuable Poster Moderator Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.