1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to create custom URL in wordpress?

Discussion in 'BlackHat Lounge' started by SkyrocketSEO, Jul 7, 2015.

Thread Status:
Not open for further replies.
  1. SkyrocketSEO

    SkyrocketSEO Jr. VIP Jr. VIP Premium Member

    Joined:
    Nov 5, 2012
    Messages:
    4,512
    Likes Received:
    11,803
    Occupation:
    travəlɪŋ
    Location:
    Aibres
    Home Page:
    Hi, lets say I need to create URL like this sitename.com/something/chf_1.php or sitename.com/something/mbb2.HTM
    As you can see problem is in the end of the URL , because previous site (that we need to redirect) was HTML site, with php and HTML
    So, I want to have these custom URLs created. Any way to do this ?
     
  2. SkyrocketSEO

    SkyrocketSEO Jr. VIP Jr. VIP Premium Member

    Joined:
    Nov 5, 2012
    Messages:
    4,512
    Likes Received:
    11,803
    Occupation:
    travəlɪŋ
    Location:
    Aibres
    Home Page:
    No one knows? Or there is no way?
     
  3. ginza

    ginza Registered Member

    Joined:
    Nov 22, 2009
    Messages:
    67
    Likes Received:
    19
    Location:
    In your heart
    go to your settings > permalinks, in custom structure field section and add extension (php/html/even custom is ok) in the end.
    it works for me. hope it also works for you.

    for example: I "create" .add extension.
    C3F29i4.png
     
    • Thanks Thanks x 1
  4. bahus

    bahus Regular Member

    Joined:
    Jun 4, 2014
    Messages:
    342
    Likes Received:
    93
    Gender:
    Male
    • Thanks Thanks x 1
  5. mickyfu

    mickyfu Jr. VIP Jr. VIP

    Joined:
    Dec 14, 2011
    Messages:
    7,218
    Likes Received:
    20,779
    Occupation:
    King Of Crypto C
    Location:
    Solihull Young Offenders
    I also had this problem and found no way around it. The best way I could find is not using WordPress.
     
    • Thanks Thanks x 1
  6. bullsbears

    bullsbears Power Member

    Joined:
    Feb 17, 2014
    Messages:
    516
    Likes Received:
    149
    Occupation:
    Derivatives Trader
    Location:
    Wall Street
    If the posts are limited and low in number then you can manually 301 redirect the previous url to new url otherwise it's a tedious job.

    Easier solution would be to just add "html" or "php" (whatever you want to use) suffix to urls without messing with the url structure completely.
    Wordpress permalink allows you to append any extension you want at the end of the url. If the previous site was a static site with html extension then you can easily add html at the end of all posts using permalink custom url feature.

    Enlighten more about the issue and let's see if a solution is carved out.
     
    • Thanks Thanks x 1
  7. SkyrocketSEO

    SkyrocketSEO Jr. VIP Jr. VIP Premium Member

    Joined:
    Nov 5, 2012
    Messages:
    4,512
    Likes Received:
    11,803
    Occupation:
    travəlɪŋ
    Location:
    Aibres
    Home Page:
    Thanks all, I guess I will be able to use .php but I will need to change all links on my site that are pointing to other pages without .php (boooring). Thanks again
     
  8. Apricot

    Apricot Administrator Staff Member Moderator

    Joined:
    Mar 26, 2013
    Messages:
    12,776
    Likes Received:
    8,186
    Gender:
    Female
    Occupation:
    BHW Admin
    Location:
    Station 2E
    Home Page:
    Assuming that the pages you're redirecting to have the same url except the file extension at the end, you can use an htaccess rule to change html extensions to php. You'll need to check the code but something like this might work:

    Code:
    RewriteRule ^(.*)\.html$ $1.php
     
Thread Status:
Not open for further replies.