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 http://example.com/files.php)
using web.config file.
rajendher
0
Light Poster
Recommended Answers
Jump to PostYou 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 Postfor this use apache rewrite. there are many tutorials online
Jump to Post^ what he said
All 11 Replies
cilla
15
Light Poster
diafol
cilla
15
Light Poster
rajendher
0
Light Poster
rajendher
0
Light Poster
rajendher
0
Light Poster
gabrielcastillo
40
Web Developer
rajendher
0
Light Poster
diafol
rajendher
0
Light Poster
pritaeas
2,194
¯\_(ツ)_/¯
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.