0

I have three urls

http://thewebby.net16.net/Welcome.php

http://thewebby.net16.net/AboutMe.php

http://thewebby.net16.net/Projects.php

How to rewrite these urls to

http://thewebby.net16.net/The-Webby-home/

http://thewebby.net16.net/Aboute-Me/

http://thewebby.net16.net/Check-out-my-portfolio-and-projects/

RewriteBase /
DirectoryIndex Welcome.php

RewriteEngine On    # Turn on the rewriting engine
RewriteRule    ^The-Webby-home/?$    Welcome.php   [NC,L]    # Handle requests for "TheWebby"/Aboute-Me/
RewriteRule    ^About-Me/?$    AboutMe.php   [NC,L]    # Handle requests for "TheWebby"

I was hosting in a free domain so error page was not showing it gets redirected to error page provided by the hosting provider .When I tried with

http://localhost/TheWebby/About-Me/ it redirects to AboutMe.php successfully but when I try to navigate to welcome.php it the url changes to

http://localhost/TheWebby/About-Me/The-Webby-home/

instead of

http://localhost/TheWebby/The-Webby-home/

codefreaK
  • 3,376
  • 4
  • 29
  • 56
  • And *how* is it not working? Error logs, sample URL and result etc? Also make up your mind about 90s-style mixed-case filenames. It's unlikely that the directoryindex `Welcome.php` works when the rewriterule uses a lowercase `welcome.php`. – mario Oct 24 '15 at 13:52
  • its not working I want The-Webby-home/ for welcome.php to appear for seo optimization but instead Welcome.php is appearing – codefreaK Oct 24 '15 at 13:56
  • That's not what RewriteRules do. They're just for remapping *incoming* URLs, not fixing existing links and HTML. See "ping-pong rewrites". – mario Oct 24 '15 at 14:23
  • @ mario if incoming url /The-Webby-home/ is incoming it redirects to Welcome.php ? – codefreaK Oct 24 '15 at 14:51
  • @mario can you help out on this specific issue – codefreaK Oct 30 '15 at 21:12
  • Bro I have updated the question please check it – codefreaK Oct 30 '15 at 21:18

0 Answers0